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

don't display world axes

leonuser
leonuser's picture
Registered: Apr 19 2010
Posts: 7
Answered

Hoi together,

my question is, if a 3D-model is open (or enabled) in the pdf, you see the world axes on the bottom left side of the 3D-model in the pdf. How can I disable them?

I read through the documentation (js_3d_api_reference.pdf page 80) and found following JavaScript:

showAxes
Determines whether the world axes are displayed.

Can somebody please give me the right syntax for the JavaScript, I gon't get it to work.
Thanks

UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
Right idea, but wrong property - "showAxes" is always false, and controls the HUGE set of axes at 0,0,0. You're looking at the orientation axes, so in the script attached to your 3D scene, just enter this line:


scene.showOrientationAxes = false;
leonuser
leonuser's picture
Registered: Apr 19 2010
Posts: 7
Thanks, it work perfect for one 3D-model in a pdf.
What may problem is now, if i have more then one model in a pdf. More like three separate import models and if i use the script on each model, it only works one the last activated model.

Is the a way the make the script work for more then one model?

Thanks for answering.
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
It's a bug. You can work around it by running a loop of code in each annotation that trawls through all the other open 3D scenes on the page, setting their axes to false:

var r3ds = host.getAnnots3D(host.pageNum);for (var i=0; i<r3ds.length; i++) {if (r3ds[i].activated) {r3ds[i].context3D.scene.showOrientationAxes = false;}}

Of course in the process it'll hide its own axes - [b]HOWEVER[/b] we know that forming this type of circular reference from an RMA out to the document and back can cause Acrobat 9 to crash in some situations. Again, another bug. Sorry, but the 3D engine is far from perfect.
leonuser
leonuser's picture
Registered: Apr 19 2010
Posts: 7
Thanks for that quick and exact answer.
I will be aware of the crashing. Perhaps you know in with composition the script could cause a crash?

Again, thanks for that helpful answer.
leonuser
leonuser's picture
Registered: Apr 19 2010
Posts: 7
ok, to early to be happy. I don't get the script to work.

I understand script so that it looks for every activated 3D scene and turn off it's OrientationAxes.

I set the pageNum to 0 but what is with the host?
The host is the 3D scene, I guess.

Or isn't there a need to make changes? The script is loaded with every 3D scene.

Thanks for helping.
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
the script as I posted it should work without any changes at all - just attach it to each annotation through the properties panel (don't try and load it as a page or document-level script). "host" is a native object that refers to the PDF file in which the 3D annotation is running, so "host.pageNum" will automatically work out what page you're on.
ekschperte
ekschperte's picture
Registered: Jun 12 2010
Posts: 29
I want to hide the world axes, too, but it does not work for me. I have one 3d annotation on the first pdf page and the attached js-file. I tried:

console.println(getAnnots3D(0)[0].context3D.scene.showOrientationAxes);
getAnnots3D(0)[0].context3D.scene.showOrientationAxes = false;
console.println(getAnnots3D(0)[0].context3D.scene.showOrientationAxes);

No effect!! The variable state changes from true to false, but the world axes are still alive in the 3d annotation. :-( Do I have to update the scene somehow?
I wonder about the the fact, that the variable "showOrientationAxes" is not beed described in the JS-3D-API?!?
rmkumaran
rmkumaran's picture
Registered: Feb 13 2011
Posts: 9
Hi,

and how to hide the 3d navigation tools on the top of the 3d window?

can anyone help?