DirectShape.CreateGeometryInstance
Description:
Creates a copy of a definition shape that was created earlier.
Creates a copy of a definition shape that was created earlier.
Remarks:
Use DirectShapeLibrary class to store definitions prior to using them here. How the definitions are stored will determine whether an instance or a copy of the shape will be created. Use the output of this function as input to CreateElement to make the created shape persistent. This is intended to support a definition/instance pattern common in CAD formats - DWG blocks, STEP MAPPED_ITEM, IFC IfcMappedItem.
Use DirectShapeLibrary class to store definitions prior to using them here. How the definitions are stored will determine whether an instance or a copy of the shape will be created. Use the output of this function as input to CreateElement to make the created shape persistent. This is intended to support a definition/instance pattern common in CAD formats - DWG blocks, STEP MAPPED_ITEM, IFC IfcMappedItem.
public static IList<GeometryObject> CreateGeometryInstance(
Document document,
string definition_id,
Transform trf
)
-
documentDocument to which the created element will be added
-
Stringdefinition_idID of the shape definition that was created earlier and stored via DirectShapeLibrary
-
trfTransform to be applied to the definition
Return Value
IList<GeometryObject>
A collection of GeometryObjects representing a placed instance of the pre-defined shape
The caller function takes ownership
-
A non-optional argument was null