ElementDataModel.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 from the authoring application, surfaced as 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.
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | Thrown when sourceId or name is null or empty. |
See Also
- interface IElement
- class Transformation
- class Unit
- class ElementDataModel
- namespace Autodesk.DataExchange.DataModels
ElementDataModel.AddElement method (2 of 2)
public IElement AddElement(string sourceId, string name, IElement parent,
Transformation transformation = null, Unit lengthUnit = null, Unit displayLengthUnit = null)
See Also
- interface IElement
- class Transformation
- class Unit
- class ElementDataModel
- namespace Autodesk.DataExchange.DataModels