DWF
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: how to get geometry data from DWF file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi Silvia, thanks very much for your answer. I've managed to read the ObjectDefinition, this returns a list of DWFDefinedObjectInstance and I'm adding new properties to these Instances using pInst->addProperty( DWFCORE_ALLOC_OBJECT(DWFProperty(L"my_name", L"my_value", L"my_category")), true );
What I can't find is a way to save the modifications to the DWF and the ObjectDefinition. What's the correct way to do this?
Thanks.
ENGworks - Software Developer
Re: how to get geometry data from DWF file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You can save the new object definition resource by DWFObjectDefinitionResource::serializeXML; here is a code snapshot:
DWFPointer<DWFBufferOutputStream> apOutputStream( DWFCORE_ALLOC_OBJECT(DWFBufferOutputStream(_DWFTK_
DWFUUID oUUID;
DWFPointer<DWFXMLSerializer> apSerializer( DWFCORE_ALLOC_OBJECT(DWFXMLSerializer(oUUID)), false );
apSerializer->attach( apOutputStream );
objectdefinitionresource->serializeXML( apSerializer, DWFPackageWriter::eObjectDefinition );
apSerializer->detach();
The code is to create a new stream of the object definition resource; then you can create a new DWFObjectDefinitionResource and attach the new stream.

Silvia Cao
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.
Re: how to get geometry data from DWF file
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thank you very much Silvia. I will try it and let you know.
ENGworks - Software Developer



