![]() |
v2.45
|
|
Allows to obtain and edit model objects. More...
Public Member Functions | |
| HRESULT | CreateNewEntityArgs ([out, retval] INewEntityArgs **ppArgs) |
| Creates arguments for creating a new entity. | |
| HRESULT | CreateObject ([in] INewEntityArgs *pArgs, [out, retval] IModelObject **ppModelObject) |
| Creates a new model object. | |
| HRESULT | CreateOperation ([out, retval] IOperation **ppOperation) |
| Creates an operation. | |
| HRESULT | DeleteObjectById ([in] int id_) |
| Deletes a model object by its local identifier. | |
| HRESULT | DeleteObjectByUniqueId ([in] GUID uniqueId_) |
| Deletes a model object by its unique identifier. | |
| HRESULT | DeleteObjectByUniqueIdS ([in] BSTR uniqueId_) |
| Same as DeleteObjectByUniqueId, but accepting GUID as a string. | |
| HRESULT | GetBoundingBox ([out, retval] Cube *pCube) |
| Returns the axis-aligned bounding box of the model. | |
| HRESULT | GetIdFromUniqueId ([in] GUID uniqueId_, [out, retval] int *id_) |
| Returns the local identifier of the object of this model by it's unique identifier. | |
| HRESULT | GetIdFromUniqueIdS ([in] BSTR uniqueId_, [out, retval] int *id_) |
| Same as GetIdFromUniqueId, but accepting GUID as a string. | |
| HRESULT | GetObjects ([out, retval] IModelObjectCollection **ppModelObjectCollection) |
| Returns a collection of all objects present in the model. | |
| HRESULT | GetUniqueIdFromId ([in] int id_, [out, retval] GUID *uniqueId_) |
| Returns the unique identifier of the object of this model by it's local identifier. | |
| HRESULT | GetUniqueIdFromIdS ([in] int id_, [out, retval] BSTR *uniqueId_) |
| Same as GetUniqueIdFromId, but returning GUID as a string. | |
Properties | |
| GUID | Id [get] |
| The identifier of the model. | |
Allows to obtain and edit model objects.
This interface can be obtained with IProject::Model (building model) property. It also can be obtained
as an additional interface from IEntity if the entity is an Assembly (IProject::Assemblies) or a Drawing (IProject::Drawings2).
| HRESULT CreateNewEntityArgs | ( | [out, retval] INewEntityArgs ** | ppArgs | ) |
Creates arguments for creating a new entity.
| [out] | ppArgs | The arguments for creating a new entity. |
| HRESULT CreateObject | ( | [in] INewEntityArgs * | pArgs, |
| [out, retval] IModelObject ** | ppModelObject ) |
Creates a new model object.
| [in] | pArgs | Arguments for creating a model object. |
| [out] | ppModelObject | The created model object instance. |
A table of matching types of objects that can be created and models in which they can be created:
| Object type | Building model | Assembly model | Drawing model |
|---|---|---|---|
| AssemblyInstance | + | + | - |
| Beam | + | + | - |
| Column | + | + | - |
| Door | + | + | - |
| DrawingImage | - | - | + |
| DrawingReferenceDrawing | - | - | + |
| DrawingText | - | - | + |
| Element | + | + | - |
| Equipment | + | - | - |
| Floor | + | + | - |
| Hatch | + | - | - |
| Hole | + | + | - |
| Image | + | + | - |
| IsolatedFoundation | + | + | - |
| Level | + | - | - |
| Line3D | + | + | - |
| MechanicalEquipment | + | - | - |
| Model3D | + | + | - |
| ModelText | + | - | - |
| Opening | + | + | - |
| Plate | + | + | - |
| PlumbingFixture | + | - | - |
| Railing | + | + | - |
| Ramp | + | + | - |
| ReferenceDrawing | + | + | - |
| Roof | + | - | - |
| Room | + | - | - |
| Stair | + | + | - |
| Wall | + | + | - |
| WallFoundation | + | + | - |
| Window | + | + | - |
For dependent objects:
| HRESULT CreateOperation | ( | [out, retval] IOperation ** | ppOperation | ) |
Creates an operation.
To modify any model object you need to create an operation and start it before the modifications are done, and apply it afterwards.
| HRESULT DeleteObjectById | ( | [in] int | id_ | ) |
Deletes a model object by its local identifier.
| [in] | id_ | Local identifier of the object being deleted. |
| HRESULT DeleteObjectByUniqueId | ( | [in] GUID | uniqueId_ | ) |
Deletes a model object by its unique identifier.
| [in] | uniqueId_ | Unique identifier of the object being deleted. |
| HRESULT DeleteObjectByUniqueIdS | ( | [in] BSTR | uniqueId_ | ) |
Same as DeleteObjectByUniqueId, but accepting GUID as a string.
| [in] | uniqueId_ | Unique identifier of the object being deleted as a string. |
| HRESULT GetBoundingBox | ( | [out, retval] Cube * | pCube | ) |
Returns the axis-aligned bounding box of the model.
For a drawing model, returns a bounding box with dimensions corresponding to the drawing's page size and a Z-coordinate of zero.
For assembly and building models, returns the bounding box of all physical geometry in the model, aligned with the Global Coordinate System axes.
For an empty assembly and building models, the function returns a bounding box with zero dimensions.
| HRESULT GetObjects | ( | [out, retval] IModelObjectCollection ** | ppModelObjectCollection | ) |
Returns a collection of all objects present in the model.