These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Can a 3D model be set to open in "spin" rather than "rotate"

3dpete
3dpete's picture
Registered: Jan 20 2010
Posts: 3
Answered

I'm doing architectural models that never need to be viewed in "rotate" so I would like to remove this feature from the toolbar.
I found one posting here that says...."You can add new custom buttons to the 3D toolbar using javascript, and dis/enable the interaction tools by name (i.e. spin, rotate, zoom)"

I havent done any java scripting, does anyone know the basics of how to get that started?

Thanks.
Pete

UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
In a text editor, create a new file, with two lines that say:

Quote:
runtime.setCurrentTool("Spin");
runtime.disableTool("Rotate");
Save it anywhere you want but with a .JS extension, and in your 3D annotation's properties panel (the one that appears when you click "advanced" during the insert process, or right-click an existing annot and choose "Properties" from the context menu) load that file into the "script" field on the 3D tab.

You can of course add more lines to disable other tools; the names to use are:

Fly
Spin
Measure
Rotate
Spin
Pan
Zoom
Walk

To change the script just load a new version of the JS file into the annot - you can't edit the Javascript from inside Acrobat.
3dpete
3dpete's picture
Registered: Jan 20 2010
Posts: 3
Thanks, I'll give it a try
Pete
floG23
floG23's picture
Registered: Apr 21 2010
Posts: 14
why does this script, where you can change the currentTool (e.g. by leftbuttondown to "rotate") override my cameraConstrain.js script behind the 3d annotation? can i workarround it?