Skip to content

BaseElementAdapter

Canonical path: NemAll_Python_IFW_ElementAdapter.BaseElementAdapter

Implementation of the base element adapter

BaseElementAdapter is used inside the IFW as general element class, e.g. as result of an element selection. The class is created as adapter to avoid future IFW changes if the internal CAD data structure will be changed.

The class has some member functions to get the general element data like name, geometry, common properties, ...

The adapter includes also the DocumentAdapter, which can be used to get the access to the internal CAD data structure.

Methods:

FromGUID staticmethod

FromGUID(guid: GUID, doc: DocumentAdapter) -> BaseElementAdapter

Get elements from GUID

Parameters:

Returns:

FromNOIGUID staticmethod

FromNOIGUID(guidstr: str, doc: DocumentAdapter) -> BaseElementAdapter

Get elements from NOI GUID

Parameters:

  • guidStr –

    NOI-GUID string of the element

  • doc (DocumentAdapter) –

    Document

Returns:

GetArchElementType

GetArchElementType() -> ArchElementType

Check the type of an architectural element (PRGBER_ELEM_ARCH)

Returns:

GetAttributes

GetAttributes(
    readState: eAttibuteReadState,
) -> list[tuple[int, int | float | str]]

Get the attributes

Parameters:

Returns:

  • list[tuple[int, int | float | str]] –

    Attributes

GetCommonProperties

GetCommonProperties() -> CommonProperties

Get the common properties of the element

Returns:

GetDisplayName

GetDisplayName() -> str

Get the displace name of the element

Returns:

  • str –

    Display name of the element

GetDocument

GetDocument() -> DocumentAdapter

Get the document

Returns:

GetDrawingfileNumber

GetDrawingfileNumber() -> int

Get the drawing file number of the element

Returns:

  • int –

    Drawing file number of the element / negative means drawing is in passive mode

GetElementAdapterType

GetElementAdapterType() -> ElementAdapterType

Get the type of the element

Returns:

GetElementUUID

GetElementUUID() -> GUID

Get the UUID of the element

Returns:

  • GUID –

    UUID of the element

GetGeometry

GetGeometry() -> Any

Get elements geometry

Returns:

  • Any –

    Geometry

GetGroundViewArchitectureElementGeometry

GetGroundViewArchitectureElementGeometry() -> Any

Get ground view geometry of an architecture element (if exist)

Returns:

  • Any –

    Geometry

GetModelElementUUID

GetModelElementUUID() -> GUID

Get the UUID of the model element

Returns:

  • GUID –

    UUID of the element

GetModelGeometry

GetModelGeometry() -> Any

Get element model geometry

Returns:

  • Any –

    Geometry

GetNOIGUID

GetNOIGUID() -> str

Get the NOI GUID

Returns:

  • str –

    NOI GUID as string

GetParentElementAdapterType

GetParentElementAdapterType() -> ElementAdapterType

Get the type of the parent element

Returns:

GetPureArchitectureElementGeometry

GetPureArchitectureElementGeometry() -> Any

Get the pure geometry of an architecture element (if exist). The geometry is without openings, ...

Returns:

  • Any –

    Geometry

GetTimeStamp

GetTimeStamp() -> int

Get the time stamp of the element

Returns:

  • int –

    Time stamp of the element creation

Is3DElement

Is3DElement() -> bool

Get the 3D state of the element

Returns:

  • bool –

    Element is a 3D element: true/false

IsActive

IsActive() -> bool

Get the activation state of the element

Returns:

  • bool –

    True, if the element is activated

IsChildParentType

IsChildParentType(childType: GUID, parentType: GUID) -> bool

Check for child (current element) and parent type connection

Parameters:

  • childType (GUID) –

    Type of the element

  • parentType (GUID) –

    Type of the parent element

Returns:

  • bool –

    Child and parent are connected by the define types

IsDeleted

IsDeleted() -> bool

Get the deleted state of the element

Returns:

  • bool –

    True, if the element is deleted

IsGeneralElement

IsGeneralElement() -> bool

Check if element is general (PRGBER_ELEM_ALLG)

Returns:

  • bool –

    Element is general (PRGBER_ELEM_ALLG)

IsInActiveDocument

IsInActiveDocument() -> bool

If element is in active document return true.

Returns:

  • bool –

    true if element is in active document

IsInActiveLayer

IsInActiveLayer() -> bool

If element is in active layer return true.

Returns:

  • bool –

    true if element is in active layer.

IsInMacro

IsInMacro() -> bool

Check if element has parent object

Returns:

  • bool –

    Element has parent

IsLabelElement

IsLabelElement() -> bool

Check if element is a part of some label (Variables Textbild)

Returns:

  • bool –

    Element is a part of some label: true/false

IsNull

IsNull() -> bool

Check for an empty element

Returns:

  • bool –

    Element is empty: true/false

IsValid

IsValid() -> bool

check if element is valid

Returns:

  • bool –

    bool, if it's possible to work with it

IsValidForSelectFace

IsValidForSelectFace() -> bool

Check if element is valid for face select

Returns:

  • bool –

    Element is valid for face select

SetVisibilityState

SetVisibilityState(visible: bool)

Set the visibility state of the element

Parameters:

  • visible (bool) –

    She visibility state to set

__eq__ overloaded

__eq__(element: BaseElementAdapter) -> bool

Equal operator

Parameters:

Returns:

  • bool –

    Elements are equal: true/false

__eq__(eleTypeUUID: GUID) -> bool

Equal operator for checking the element adapter type UUID

Parameters:

  • eleTypeUUID (GUID) –

    Element type UUID

Returns:

  • bool –

    Element has the type: true/false

__init__ overloaded

__init__()

Initialize

__init__(element: BaseElementAdapter)

Copy constructor

Parameters:

__ne__ overloaded

__ne__(eleType: BaseElementAdapter) -> bool

Not equal operator for checking the element type

Parameters:

Returns:

  • bool –

    Element has not the type: true/false

__ne__(eleType: GUID) -> bool

Not equal operator for checking the element type

Parameters:

  • eleType (GUID) –

    Element type

Returns:

  • bool –

    Element has not the type: true/false

__repr__

__repr__() -> str

Convert to string

Placeholder