Create a copy of a definition shape that was created earlier.
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. See DirectShapeLibrary for more details.
Use the output of this function as input to CreateElement to make the created shape persistent.
Namespace:
Autodesk.Revit.DB
Assembly:
RevitAPI
(in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since:
2015
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
-
Type:
Autodesk.Revit.DB
Document
Document to which the created element will be added
- definition_id
-
Type:
System
String
ID of the shape definition that was created earlier and stored via DirectShapeLibrary
- trf
-
Type:
Autodesk.Revit.DB
Transform
Transform to be applied to the definition
Return Value
A collection of geometry objects representing a placed instance of the pre-defined shape The caller function takes ownershipRemarks
This is intended to support a definition/instance pattern
common in CAD formats - DWG blocks, STEP MAPPED_ITEM, IFC IfcMappedItem.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was NULL |