ElementDataModel.DeleteElementsBySourceId method
Deletes every element that shares the given SourceId, returning how many were deleted. Use this when a SourceId may be shared by multiple elements (SourceIds are not guaranteed unique). Each deletion also removes the element’s non-shared hierarchical structure; shared model structure is not removed.
public int DeleteElementsBySourceId(string sourceId)
| parameter | description |
|---|---|
| sourceId | The SourceId to delete all matches for. |
Return Value
The number of elements deleted (0 when none match).
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | Thrown when sourceId is null. |
| ArgumentException | Thrown when sourceId is empty. |
See Also
- class ElementDataModel
- namespace Autodesk.DataExchange.DataModels