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.
FromGUID
staticmethod
FromGUID(guid: GUID, doc: DocumentAdapter) -> BaseElementAdapter
Get elements from GUID
Parameters:
-
guid
(GUID
) –GUID of the element
-
doc
(DocumentAdapter
) –Document
Returns:
-
BaseElementAdapter
–Document
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:
-
BaseElementAdapter
–Document
GetArchElementType
GetArchElementType() -> ArchElementType
Check the type of an architectural element (PRGBER_ELEM_ARCH)
Returns:
-
ArchElementType
–Arch Element type
GetAttributes
GetAttributes(
readState: eAttibuteReadState,
) -> list[tuple[int, int | float | str]]
Get the attributes
Parameters:
-
readState
(eAttibuteReadState
) –Attribute read state
Returns:
-
list[tuple[int, int | float | str]]
–Attributes
GetCommonProperties
GetCommonProperties() -> CommonProperties
Get the common properties of the element
Returns:
-
CommonProperties
–Common properties of the element
GetDisplayName
Get the displace name of the element
Returns:
-
str
–Display name of the element
GetDrawingfileNumber
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
GetElementUUID
GetElementUUID() -> GUID
GetGroundViewArchitectureElementGeometry
Get ground view geometry of an architecture element (if exist)
Returns:
-
Any
–Geometry
GetModelElementUUID
GetModelElementUUID() -> GUID
GetParentElementAdapterType
GetParentElementAdapterType() -> ElementAdapterType
GetPureArchitectureElementGeometry
Get the pure geometry of an architecture element (if exist). The geometry is without openings, ...
Returns:
-
Any
–Geometry
GetTimeStamp
Get the time stamp of the element
Returns:
-
int
–Time stamp of the element creation
Is3DElement
Get the 3D state of the element
Returns:
-
bool
–Element is a 3D element: true/false
IsActive
Get the activation state of the element
Returns:
-
bool
–True, if the element is activated
IsChildParentType
IsDeleted
Get the deleted state of the element
Returns:
-
bool
–True, if the element is deleted
IsGeneralElement
Check if element is general (PRGBER_ELEM_ALLG)
Returns:
-
bool
–Element is general (PRGBER_ELEM_ALLG)
IsInActiveDocument
If element is in active document return true.
Returns:
-
bool
–true if element is in active document
IsInActiveLayer
If element is in active layer return true.
Returns:
-
bool
–true if element is in active layer.
IsLabelElement
Check if element is a part of some label (Variables Textbild)
Returns:
-
bool
–Element is a part of some label: true/false
IsValid
check if element is valid
Returns:
-
bool
–bool, if it's possible to work with it
IsValidForSelectFace
Check if element is valid for face select
Returns:
-
bool
–Element is valid for face select
SetVisibilityState
Set the visibility state of the element
Parameters:
-
visible
(bool
) –She visibility state to set
__eq__
overloaded
__eq__(element: BaseElementAdapter) -> bool
Equal operator
Parameters:
-
element
(BaseElementAdapter
) –Element to compare
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
__ne__
overloaded
__ne__(eleType: BaseElementAdapter) -> bool
Not equal operator for checking the element type
Parameters:
-
eleType
(BaseElementAdapter
) –Element type
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