Request

Response

    IElementDataModel interface

    This interface is used to define an element data model.

    public interface IElementDataModel
    

    Members

    namedescription
    AllGeometryCounts { get; } Gets the count of different geometry types for all geometries in the exchange without downloading geometry files. This includes both element-specific geometries and model-level geometries attached to the root design asset. This property provides an efficient way to determine what types of geometries are available in the entire exchange before deciding whether to download them.
    DeletedElements { get; } Gets the deleted elements.
    Description { get; set; } Gets or sets the description for the exchange. This description will be included when syncing the data to the exchange.
    Elements { get; } Gets the elements.
    Parameters { get; } Gets all the parameters that have been assigned at the model level. These parameters do not apply to any specific element.
    RootAssetName { get; set; } Gets or sets the name of the root asset in the exchange data model.
    TopLevelElements { get; } Gets the top level elements.
    AddElement(…) Adds an element to the model. Use Classify and DefineType/SetType after adding the element to assign classification and type. (2 methods)
    AddParameterAsync(…) This method is used to add a parameter at the model level.
    AddTypeParameterAsync(…) Attaches a type parameter to type, resolving the handle's backing design asset directly (never a global-by-name lookup — fixes the type-attribution bug, D-4).
    Classify(…) Find-or-creates the (system, value) classification nested under parent (root if null), attaches element under the deepest classification, and returns the handle. Reuse-on-identical / throw-on-conflict by SourceId (D-6).
    CreateTypeParameterAsync(…) This method is used to create a type parameter.
    DefineType(…) Defines a type (the privileged classification backing a shared type DesignAsset) under parent (root if null) and returns its handle. Reuse-on-identical / throw-on-conflict by sourceId (D-4/D-6). Type parameters attach to the returned handle (never resolved by global name — fixes the type-attribution bug).
    DeleteElementByUniqueId(…) Deletes an element identified by its system-generated unique persistent Id. Unlike DeleteElementsBySourceId, this method unambiguously identifies the element to delete even when multiple elements share a SourceId.
    DeleteElementsBySourceId(…) Deletes every element that shares the given SourceId and returns how many were deleted. Use this when a SourceId may be shared by multiple elements. Mirrors GetElementsBySourceId.
    DeleteParameter(…) Deletes a parameter that has been assigned at the model level. This parameter is not specific to any element.
    DeleteTypeParameter(…) This method is used to delete a type parameter.
    FindTypeParameter(…) Given Type and parameterName, this method returns a matching parameter if it is already present in the asset, null otherwise.
    GetAllElements(…) This method is used to get all elements.
    GetCreatedElements(…) This method is used to get the created elements.
    GetDeletedElements(…) This method is used to get the deleted elements.
    GetDesign(…) Returns a read only reference to the Design associated with the element.
    GetDesignByUniqueId(…) Returns a design by its system-generated unique persistent Id (see UniqueId).
    GetDesignInstances(…) Returns all the elements that have instantiated this design.
    GetDesignInstancesByName(…) Returns all the elements that have instantiated this design by design name.
    GetDesignInstancesBySourceId(…) Returns all the elements that have instantiated this design, keyed by the design's SourceId.
    GetDesignRefs() Enumerate the DESIGN REFERENCES in this model — design assets authored as reusable definitions (blocks, families, sub-assemblies, parts) that instance elements point at.
    GetDesignsBySourceId(…) Returns all designs whose SourceId matches the specified value.
    GetElementByUniqueId(…) Returns an IElement by its system-generated unique persistent Id (see UniqueId). Unlike GetElementsBySourceId, this lookup is unambiguous even when multiple elements share a SourceId.
    GetElementGeometriesAsync(…) This method is used to get the element geometry by element.
    GetElementGeometryCounts(…) Gets the count of different geometry types for the specified elements without downloading geometry files. This method provides an efficient way to determine what types of geometries are available for a set of elements before deciding whether to download them.
    GetElementsBySourceId(…) Returns all non-deleted IElements whose SourceId matches the specified value. Use this method when the same SourceId may be shared by multiple elements.
    GetGeometriesAsync(…) Gets geometries that have been assigned at the model level, filtered by geometry type and output options.
    GetModifiedElements(…) This method is used to get the modified elements.
    GetOrCreateDesignRef(…) Create-or-reuse a design keyed by a stable, connector-chosen sourceId. First call references seedElement's design; subsequent calls with the same SourceId return the existing design and ignore seedElement/designName. Idempotent within a model build.
    GetViewableWorldCoordinates() Gets the viewable world coordinates.
    InstantiateDesign(…) Instantiates a design in an element. This allows reusing the same design (geometry + model hierarchy) across multiple elements. Examples: Reuse the same design in multiple elements, create a sub-assembly from a part, or create multiple instances of a block, etc.
    InstantiateDesignBySourceId(…) Resolve the design with stable sourceId and instantiate it into instanceElement. Idempotent per element; throws if no such design exists yet.
    SetElementGeometry(…) This method is used to set the element geometry by element.
    SetGeometries(…) Sets geometries at model level. These geometries are not for a specific element but rather apply to the 3D Model as a whole.
    SetType(…) References a previously-defined type on element by handle (canonical, unambiguous — D-4). (2 methods)
    SetViewableWorldCoordinates(…) Sets the world coordinates for the viewable.
    UpdateParameter(…) Updates a parameter that has been assigned at the model level. This parameter is not specific to any element.
    UpdateTypeParameter(…) This method is used to update a type parameter.

    See Also