4

Everything is still working - the 3D-Animation of a 3D-Part in my PDF and other options like the 3Dmenu or the toolbar.

But now I want to add some Mediabuttons with \mediabutton[3Dgotoview=...]. For this opportunity I need a working Views-File with informations about the views. The content of my views-file is just easy to get with the JavaScriptConsole. But how can I create such a file? Just for contents like:

VIEW=First View
  COO=-43.4 -1603.9 2199.1
  C2C=0.03 -0.5 -0.8
  ROO=2274.1
  LIGHTS=CAD
END

Yours sincerely and thanks for help.

2

You fill the JavaScript console with as many VIEW sections as you want, by manipulating the model to your liking and then selecting 'Get Current View' from the context menu. This requires \includemedia option 3Dmenu.

Copy the console content and paste it into a text file, say myviews.vws, opened in a text editor of your liking. Edit the file, giving meaningful names to the generated views, e. g. VIEW=First View etc.

Now edit your *.tex file to make use of myviews.vws and to insert media buttons:

\includemedia[
  label=my3dobject,
  3Dviews=myviews.vws,
  width=4cm,height=4cm,
  3Dmenu,
  ...
]{click!}{something.u3d}\\
\mediabutton[3Dgotoview=my3dobject:(First View)]{\fbox{First View}}
\mediabutton[...]{...}

Finally, when you are done, option 3Dmenu can be removed.

See, e. g. the example in Fig. 7 of the media9 documentation.

  • Hey, thanks for your quick help Alex. I copied the results from the JavaScript console ('Get Current View') into a .txt-File and saved it under the name 'myviews.vws'. Now if I run the Tex-File I got the Message '!media9 error: "file not found" - File: 'myviews.vws' not found.' ... The file is just in the same folder as the *.tex-file. So what for a problem could it be? Thanks a lot! – Confetti_Cannon Jul 11 '13 at 7:33
  • @Confetti_Cannon: Weird. Sure you made no typo while naming the views file (CaSe mAtTeRs!)? – AlexG Jul 11 '13 at 7:49
  • Yea, now I tried it with a smaller example, but still the same problem - the 'views.vws not found'. This File is still a Text-File and saved just with the text wrote above ("VIEW=..... [...] END") and saved in the folder of the .tex-/u3d-folder, right? – Confetti_Cannon Jul 11 '13 at 8:29
  • If it is in the same folder as your *tex and your *u3d it should be ok. Are you running Windows? Be sure, while renaming, Windows doesn't silently append .txt to the file name, creating a file myviews.vws.txt. BTW, it is not mandatory for views files to end in .vws, myviews.txt will do as well. Of course, you must say 3Dviews=myviews.txt then. – AlexG Jul 11 '13 at 8:36
  • Just a simple solution for a subjective big problem... Yeah, plus .txt it works! Really great, thanks a lot, AlexG! – Confetti_Cannon Jul 11 '13 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.