Community
DWF
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DWFObject and DWFInstance

2 REPLIES 2
Reply
Message 1 of 3
cng
Explorer
1387 Views, 2 Replies

DWFObject and DWFInstance

Newbie question on DWFToolKit.  Given an instance of DWFInstance, how do I get the corresponding DWFObject?

And given a DWFObject, how do I get the associated DWFInstance?

 

Thank you in advance.

 

--Chi

2 REPLIES 2
Message 2 of 3
SilviaCao
in reply to: cng

Thank you for your questions.

The DWF Instance is recorded in the DWF Object Definition resource and DWF Content Definition resource. Please refer to the DWF Toolkit samples “ObjectDefinitionReader” and “ReadContentDefinition” to get the DWF Instance.

 

The 3D DWF Object is recorded in the 3D Graphic Resource. Please refer to the toolkit sample “SimpleW3DStreamProcessor” to parse the 3D Graphic Resource; you can get each DWF Object by TK_Tag. Please refer to the DWF Toolkit help doc for more detail information about the TK_Tag.

 

After getting the DWF Instance and DWF Object, you can match them: the DWF Instance node Id is equal to the Tag id (which is the DWF Object node Id).

 

Please let us know if you have any further questions.



Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Message 3 of 3
geotavros
in reply to: cng

This is how you match DWFObject and DWFInstance:

 

DWFObject *obj;

//...

DWFInstance* pInstance = piInstance->value();

DWFRenderable* pRendered = pInstance->getRenderedElement();

 

obj->id() == pRendered->id(); 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services