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

Model Tree Levels and Mesh Areas - Acrobat X

kiara
kiara's picture
Registered: Sep 20 2011
Posts: 2

Hi,
 
Model level settings control and Mesh areas extraction possible in Acrobat X?
 
I need to set up different (300 and more!) options of Model Tree Levels switched on/off. Is there a way to control these "on/off levels settings" through javascript and not by setting up views for each option, in order to automate the process? Or is there a way to create views with Node visibilty settings in field scripts?
 
Furthermore is it possible to extract information such as the mesh area (that is visible when "Show Physical Properties" is clicked)?
 
many thanks for your help!
 
kiara

My Product Information:
Acrobat Pro 10.0.1, Windows
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
You can set the visibility of mesh nodes with 3D JavaScript, but the properties do not inherit - you can't set a property for the top of a tree, you have to set it on every node individually. Usually we would do that by comparing the name of every node against a pattern or an array. Here's an example function from my 3D JavaScript Tech Talk you can use as a starting point:
.
.

// Sets visibility and render mode of all meshes, using a wildcard match
// either of the object itself or the object's parent
// eg partVisW("leg","wireframe",0) affects anything with "leg" in the name (leg1, myleg...)

function partStateW(_name, _state, _vis) {
var currMesh = null;
var nN = null;
var nP = null;
for (i=0; i -1) || (nN.indexOf(_name) > -1)) {
if (_state != "") currMesh.renderMode = _state;
if (_vis != 0) currMesh.visible = (_vis>0);
}
}
}


There is no scripting access to create new 3D views, only to select views from the existing array.

In terms of custom metadata associated with a node, you can inspect the node.metadataString and node.info strings, but they won't contain all the information you can see on the Model Tree.
kiara
kiara's picture
Registered: Sep 20 2011
Posts: 2
Uvsar,
thanks for the quick reply!
It is great to know that I can handle the mesh nodes visibility. I am using the .visible property directly in a text field rather than the 3D context level function, and it works great!
For the node.info and node.metadataString I manage to identify the node but cannot extract any information on it. Is it possible that I loose the node information while exporting the 3d model? What kind of information will these two properties give me exactly?
many thanks!
cheers,
kiara
UVSAR
UVSAR's picture
Expert
Registered: Oct 29 2008
Posts: 1357
the .info and .metadataString properties are very rarely used - some third-party applications write to them when creating 3D PDF files but there's no real expectation of content from Acrobat.