API Reference > OdDb Classes > OdDbHatch Class > OdDbHatch Methods > OdDbHatch::decomposeForSave Method
OdDbHatch::decomposeForSave Method
Syntax
C++
OdDbObjectPtr decomposeForSave(OdDb::DwgVersion ver, OdDbObjectId& replaceId, bool& exchangeXData);
Parameters 
Description 
OdDb::DwgVersion ver 
[in] Drawing version to save as.  
OdDbObjectId& replaceId 
[out] Object ID of the object replacing this object.  
bool& exchangeXData 
[out] Set to true if and only if this function did not add XData to the replacement object. 

Determines the behavior for custom objects when saving to .dwg or .dxf file. 

 

This function either 

 

  • Returns an OdDbObjectPtr for a non- database -resident (NDBRO) replacement object, setting replaceId to OdDbObjectId::kNull.
  • Returns NULL, setting replaceId for a database -resident (DBRO) replacement object.

 

Custom objects can decompose themselves into other objects, adding additional XData as required. The Drawings transfers XData from this object to the replacement object if and only if exchangeXData is true. 

The default implementation returns NULL and sets replaceId to OdDbObjectId::kNull. This function can be overridden in custom classes. 

The method is not intended to be called by client code. For processing owned objects use *convertForSave()* method.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.