Search Results for

    Show / Hide Table of Contents

    Interface IElements

    Gives access to elements.

    Namespace: TopSolid.Kernel.Automating
    Assembly: cs.temp.dll.dll
    Syntax
    [AvailableSinceVersion(7, 6, 0, 0)]
    public interface IElements
    Remarks

    This interface is available since v7.6.

    Methods

    Delete(ElementId)

    Deletes an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Delete(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to delete.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    DeleteSeveral(List<ElementId>)

    Deletes several elements.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void DeleteSeveral(List<ElementId> inElementIds)
    Parameters
    Type Name Description
    List<ElementId> inElementIds

    Identifiers of the elements to delete.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    Exists(ElementId)

    Tells whether an element still exists.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool Exists(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    The element still exists.

    Remarks

    This method is available since v7.6.

    GetColor(ElementId)

    Gets the color of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    Color GetColor(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    Color

    Color of the element, or Empty if the element has no color.

    Remarks

    This method is available since v7.6.

    GetComment(ElementId)

    Gets the comment of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetComment(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.String

    Comment of the element, or null if the element has no comment.

    Remarks

    This method is available since v7.6.

    GetConstituents(ElementId)

    Gets the constituent elements of a composite element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<ElementId> GetConstituents(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    List<ElementId>

    Contituent elements found.

    Remarks

    This method is available since v7.6.

    GetDescription(ElementId)

    Gets the description of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetDescription(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.String

    Description of the element, or null if the element has no description.

    Remarks

    This method is available since v7.6.

    GetElements(DocumentId)

    Gets the elements of a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    List<ElementId> GetElements(DocumentId inDocumentId)
    Parameters
    Type Name Description
    DocumentId inDocumentId

    Identifier of the document to analyze.

    Returns
    Type Description
    List<ElementId>

    Elements found.

    Remarks

    This method is available since v7.6.

    GetFriendlyName(ElementId)

    Gets the friendly name of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetFriendlyName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.String

    Friendly name of the element.

    Remarks

    This method is available since v7.6.

    GetName(ElementId)

    Gets the name of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.String

    Name of the element, or null if the element has no name.

    Remarks

    The name may need translation before exposing it to the user if it is a system name (see HasSystemName(ElementId)).

    The name displayed to the user is obtained by the GetFriendlyName(ElementId) method.

    This method is available since v7.6.

    GetOwner(ElementId)

    Gets the owner element of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    ElementId GetOwner(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    ElementId

    Identifier of the owner element, or Empty if the element does not have an owner.

    Remarks

    This method is available since v7.6.

    GetParent(ElementId)

    Gets the parent operation of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    ElementId GetParent(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    ElementId

    Identifier of the parent operation, or Empty if the element does not have a parent.

    Remarks

    This method is available since v7.6.

    GetProperties(ElementId)

    Gets the full names of the properties of an element.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    List<string> GetProperties(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    List<System.String>

    Full names of the element properties.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyBooleanValue(ElementId, String)

    Gets the value of an element Boolean property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    bool GetPropertyBooleanValue(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element Boolean property to analyze.

    Returns
    Type Description
    System.Boolean

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyDateTimeValue(ElementId, String)

    Gets the value of an element date and time property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    DateTime GetPropertyDateTimeValue(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element date and time property to analyze.

    Returns
    Type Description
    System.DateTime

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyIntegerValue(ElementId, String)

    Gets the value of an element integer property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    int GetPropertyIntegerValue(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element integer property to analyze.

    Returns
    Type Description
    System.Int32

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyLocalizedDomainName(ElementId, String)

    Gets the localized domain name of an element property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyLocalizedDomainName(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element property to analyze.

    Returns
    Type Description
    System.String

    Localized domain name of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyLocalizedName(ElementId, String)

    Gets the localized name of an element property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyLocalizedName(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element property to analyze.

    Returns
    Type Description
    System.String

    Localized name of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyRealUnit(ElementId, String, out UnitType, out String)

    Gets the unit of an element real property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    void GetPropertyRealUnit(ElementId inElementId, string inFullName, out UnitType outUnitType, out string outUnitSymbol)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element real property to analyze.

    UnitType outUnitType

    Unit type.

    System.String outUnitSymbol

    Unit symbol in English.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyRealValue(ElementId, String)

    Gets the value of an element real property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    double GetPropertyRealValue(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element real property to analyze.

    Returns
    Type Description
    System.Double

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyTextValue(ElementId, String)

    Gets the value of an element text property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    string GetPropertyTextValue(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element text property to analyze.

    Returns
    Type Description
    System.String

    Value of the property.

    Remarks

    This method is available since v7.8.300.60.

    GetPropertyType(ElementId, String)

    Gets the type of an element property.

    Declaration
    [AvailableSinceVersion(7, 8, 300, 60)]
    PropertyType GetPropertyType(ElementId inElementId, string inFullName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    System.String inFullName

    Full name of the element property to analyze.

    Returns
    Type Description
    PropertyType

    Type of the property, or None if the element does not have the property.

    Remarks

    This method is available since v7.8.300.60.

    GetTransparency(ElementId)

    Gets the transparency of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    double GetTransparency(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Double

    Transparency of the element within [0,1], or -1 if the element has no transparency.

    Remarks

    When the transparency is equal to 0, the element is fully opaque.

    When the transparency is equal to 1, the element is fully transparent.

    This method is available since v7.6.

    GetTypeFullName(ElementId)

    Gets the full name of the type of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    string GetTypeFullName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.String

    Full name of the type of the element.

    Remarks

    This method is available since v7.6.

    GetTypeGuid(ElementId)

    Gets the GUID of the type of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    Guid GetTypeGuid(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Guid

    GUID of the type of the element.

    Remarks

    This method is available since v7.6.

    HasColor(ElementId)

    Tells whether an element has a color.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasColor(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a color.

    Remarks

    This method is available since v7.6.

    HasComment(ElementId)

    Tells whether an element has a comment.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasComment(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a comment.

    Remarks

    This method is available since v7.6.

    HasDescription(ElementId)

    Tells whether an element has a description.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasDescription(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a description.

    Remarks

    This method is available since v7.6.

    HasName(ElementId)

    Tells whether an element has a name.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a name.

    Remarks

    This method is available since v7.6.

    HasSystemName(ElementId)

    Tells whether an element has a system name.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasSystemName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a system name.

    Remarks

    System names start with '$' and are translated before being exposed to the user.

    This method is available since v7.6.

    HasTransparency(ElementId)

    Tells whether an element has a transparency.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasTransparency(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a transparency.

    Remarks

    This method is available since v7.6.

    HasUniqueName(ElementId)

    Tells whether an element has a name that is unique in its document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool HasUniqueName(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element has a name that is unique in its document.

    Remarks

    This method is available since v7.6.

    Hide(ElementId)

    Hides an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Hide(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to hide.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    IsAlive(ElementId)

    Tells whether an element is alive.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsAlive(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element is alive.

    Remarks

    This method is available since v7.6.

    IsColorModifiable(ElementId)

    Tells whether the color of an element is modifiable.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsColorModifiable(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    The color of the element is modifiable.

    Remarks

    This method is available since v7.6.

    IsDeletable(ElementId)

    Tells whether an element may be deleted.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsDeletable(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element may be deleted.

    Remarks

    This method is available since v7.6.

    IsInvalid(ElementId)

    Tells whether an element is invalid.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsInvalid(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element is invalid.

    Remarks

    This method is available since v7.6.

    IsModifiable(ElementId)

    Tells whether an element is modifiable.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsModifiable(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    The element is modifiable.

    Remarks

    This method is available since v7.6.

    IsRenamable(ElementId)

    Tells whether the name of an element may be modified.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsRenamable(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the name of the element may be modified.

    Remarks

    This method is available since v7.6.

    IsTransparencyModifiable(ElementId)

    Tells whether the transparency of an element is modifiable.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsTransparencyModifiable(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    The transparency of the element is modifiable.

    Remarks

    This method is available since v7.6.

    IsVisible(ElementId)

    Tells whether an element is visible.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    bool IsVisible(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to analyze.

    Returns
    Type Description
    System.Boolean

    Whether the element is visible.

    Remarks

    This method is available since v7.6.

    SearchByName(DocumentId, String)

    Searches for an element with a specified name in a document.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    ElementId SearchByName(DocumentId inDocument, string inName)
    Parameters
    Type Name Description
    DocumentId inDocument

    Document to analyze.

    System.String inName

    Name of the element to search.

    Returns
    Type Description
    ElementId

    Element found, or empty if not found.

    Remarks

    Only elements with unique name (i.e. HasUniqueName(ElementId) returns true on that element) are found.

    This method is available since v7.6.

    SetColor(ElementId, Color)

    Sets the color of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void SetColor(ElementId inElementId, Color inColor)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to modify.

    Color inColor

    New color of the element.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    SetComment(ElementId, String)

    Sets the comment of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void SetComment(ElementId inElementId, string inComment)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to modify.

    System.String inComment

    New comment of the element.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    SetDescription(ElementId, String)

    Sets the description of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void SetDescription(ElementId inElementId, string inDescription)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to modify.

    System.String inDescription

    New description of the element.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    SetName(ElementId, String)

    Sets the name of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void SetName(ElementId inElementId, string inName)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to modify.

    System.String inName

    New name of the element.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    SetTransparency(ElementId, Double)

    Sets the transparency of an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void SetTransparency(ElementId inElementId, double inTransparency)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to modify.

    System.Double inTransparency

    New transparency of the element within [0,1].

    Remarks

    When the transparency is equal to 0, the element is fully opaque.

    When the transparency is equal to 1, the element is fully transparent.

    The transparency is internally rounded to discrete values, so getting the transparency afterwards will not necessarily return the same value than the one provided when setting it.

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    Show(ElementId)

    Shows an element.

    Declaration
    [AvailableSinceVersion(7, 6, 0, 0)]
    void Show(ElementId inElementId)
    Parameters
    Type Name Description
    ElementId inElementId

    Identifier of the element to show.

    Remarks

    StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.

    This method is available since v7.6.

    In This Article
    • Mentions légales
    • C.G.U
    • Données personnelles

    Copyright © 2024 TopSolid Tous droits réservés