HM_ExtAPI::GetRootCADDocumentsCount()
Returns the number of root documents in the model assembly hierarchy for each CAD model loaded into HyperMesh database.
Syntax
bool GetRootCADDocumentsCount(
int & docs_count
);
Type
HyperMesh Ext API Function
Description
The function GetRootCADDocumentsCount is used together with the function HM_ExtAPI::GetRootCADDocument() to access root documents of assembly hierarchy for each of the CAD models loaded into HyperMesh database.
HyperMesh has the ability to load simultaneously several independent CAD models. If the parameter replace_old in the function HM_ExtAPI::ImportModel() is set to false then the model is imported without deleting previously loaded models.
In case of multiple loaded CAD models several independent assembly hierarchy trees can be created for each of the models (if supported by the translator). The function GetRootCADDocumentsCount returns the number of independent assembly hierarchy trees.
If the parameter replace_old in the function HM_ExtAPI::ImportModel() is set to true then all previously loaded models are deleted from the HyperMesh database before importing the new model. In this case the number of assembly hierarchy trees is guaranteed to be not larger than one.
If the function succeeds, the return value is true. If the function fails, the return value is false. To get extended value information, call HM_ExtAPI::GetLastErrorCode().
Requires including hm_extapi.h.
Inputs
- docs_count
- [out] - Number of root documents.
Errors
None.