IElementDataModel.AddElement method (1 of 2)
Adds an element to the model. Use Classify and DefineType/SetType after adding the element to assign classification and type.
public IElement AddElement(string sourceId, string name, Transformation transformation = null,
Unit lengthUnit = null, Unit displayLengthUnit = null)
| parameter | description |
|---|---|
| sourceId | The element's source identifier — the Id of the corresponding object in the authoring application. Becomes SourceId. Not guaranteed to be unique. |
| name | Display name of the element. |
| transformation | Optional 4x4 transformation (translation/rotation/scale). |
| lengthUnit | Length unit (defaults to Feet). |
| displayLengthUnit | Display length unit (defaults to Feet). |
Return Value
The created element.
See Also
- interface IElement
- class Transformation
- class Unit
- interface IElementDataModel
- namespace Autodesk.DataExchange.Interface
IElementDataModel.AddElement method (2 of 2)
Adds an element to the model under a parent element. Use Classify and DefineType/SetType after adding the element to assign classification and type.
public IElement AddElement(string sourceId, string name, IElement parent,
Transformation transformation = null, Unit lengthUnit = null, Unit displayLengthUnit = null)
| parameter | description |
|---|---|
| sourceId | The element's source identifier — the Id of the corresponding object in the authoring application. Becomes SourceId. Not guaranteed to be unique. |
| name | Display name of the element. |
| parent | The parent element, or null for a top-level element. |
| transformation | Optional 4x4 transformation (translation/rotation/scale). |
| lengthUnit | Length unit (defaults to Feet). |
| displayLengthUnit | Display length unit (defaults to Feet). |
Return Value
The created element.
See Also
- interface IElement
- class Transformation
- class Unit
- interface IElementDataModel
- namespace Autodesk.DataExchange.Interface