How do I access the attributes/properties of a CAD file in HOOPS Communicator?

First you have to make sure to add this option to the conveter.exe command line:
–sc_export_attributes “true”
Then you can access the attributes via the XML file saved during conversion and/or in the web client like so:
function selectionChanged (selection){
var parent = viewer.getModel().getNodeParent( selection._selection._nodeId );
viewer.getModel().getNodeProperties(parent).then(function( response ){ console.log( response );
});
}
You can also access the attributes as you perform the translation to Stream Cache. You need to use the above mentioned flag to export the attributes, and you also need to specify --output_xml_assemblytree “file.xml”. You can then parse the XML file and get the attributes and other info about the model.

Return to techsoft3d.com