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

Redirect 3D toolbar events

flaschen_post
flaschen_post's picture
Registered: Aug 17 2009
Posts: 10

Hi!

Due to the requirements of my project I disabled the 3D toolbar and created custom buttons that can perform the needed features of the toolbar. So far I was able to create buttons that can act as pan, rotate, and zoom buttons. I'm missing two more features: "default view" and "toggle cross section". Is there a way to redirect these events to my own buttons?

My Product Information:
Acrobat Pro Extended 9.1.3, Windows
dhallida
dhallida's picture
Registered: Jul 26 2007
Posts: 31
Hi,

You didn't indicate how you created the buttons, but assuming you are working with Acrobat Forms (vs. LiveCycle XFA Forms), you can create buttons and set the actions to open named views. You can set the default view in view mnagement, so that may be the approach you can take.

I am not certain if there is an easy way to toggle sectioning, but you should be able to create a section view and navigate to it as described above. The setting will be retained for that view, but I'm afraid I cannot think of a way to switch section on for all views.

You may be able to access these capabilities using JavaScript and the Acrobat API, but I have not attempted that. Feel free to respond or email me to continue this dialog.

I am an Adobe Business Development Manager specializing in Manufacturing. I am a vetran of many years in manufacturing and PLM, and focus much of my efforts in 3D PDF and how it can be used to solve numerous customer business problems and challenges.

flaschen_post
flaschen_post's picture
Registered: Aug 17 2009
Posts: 10
Hi,

Thanks for your reply. Yes I am using form buttons. My PDF file is being dynamically created via IAC. Do to the requirements there should be no manual changes after creating the document via IAC. Therefore your solution doesn't work for me. I was able to create my own “default view” button by resetting the camera position.
Is there no event name for the slice tool as there is for example for the rotating and pan tool? I really would like to add this feature without making manual changes to the PDF document.
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
Within the JS 3D API, cross sections are created using a ClippingPlane object via the scene.createClippingPlane() method. A ClippingPlane object is a scene node, so the usual transform systems using matrix4x4 work, though accessing one that's been created by the GUI is more difficult as you have to trawl through the node tree to find it (clipping planes don't have names like views do). Of course everything about a clip is stored with views, so turning it off and on or setting the transparency is expected to be done by switching to another named view rather than accessing the object. I know you're needing it for a different reason, but it's not something we expected to see.

You'll find very sparse reference in the SDK help files, as to put it bluntly nobody bothered - creating and manipulating clips using JS is so fiendishly mathematical it's always easier to use the GUI to do it. I can't even confirm that all the relevant bits of the API are in 9.1.
flaschen_post
flaschen_post's picture
Registered: Aug 17 2009
Posts: 10
Hi,

Thank you for the hint. I was able to solve my problem with creating my own clipping plane. It is more difficult this way, but at least it works.
I have still one question left: I rotated my clipping plane. If I change to one of the given views (top, bottom, ...) the clipping plane is reset to its default Matrix (facing the y Axis). Now I'm not sure if my created clipping plane is being reset or if it is being destroyed and replaced by a new one. Is there a way I can keep my clipping plane by setting the given views?
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
That's where it gets difficult - the named views defined via the toolbar try to remember everything in a scene, but get confused by scripted content. Haven't tried it, but I think if you manipulate the camera position directly using JS your plane will stay where you want it.

I'll have a poke about inside the code when I get a moment, but it won't be this week.
flaschen_post
flaschen_post's picture
Registered: Aug 17 2009
Posts: 10
Thanks for your help!
I solved my problem by creating my own views and disabling the creation of the defined views. Seems like that as soon as you are working with JS you should disable all default settings from Acrobat. There are just too many possible problems that could occur.