Base Element Adapter
Class full 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.
Functions
FromGUID(guid, doc)
staticmethod
Get elements from GUID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
guid
|
GUID
|
GUID of the element |
required |
doc
|
DocumentAdapter
|
Document |
required |
Returns:
Type | Description |
---|---|
BaseElementAdapter
|
Document |
FromNOIGUID(guidstr, doc)
staticmethod
Get elements from NOI GUID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
guidStr
|
NOI-GUID string of the element |
required | |
doc
|
DocumentAdapter
|
Document |
required |
Returns:
Type | Description |
---|---|
BaseElementAdapter
|
Document |
GetArchElementType()
Check the type of an architectural element (PRGBER_ELEM_ARCH)
GetAttributes(readState)
Get the attributes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
readState
|
eAttibuteReadState
|
Attribute read state |
required |
Returns:
Type | Description |
---|---|
list[tuple[int, Union[int, float, str]]]
|
Attributes |
GetCommonProperties()
Get the common properties of the element
Returns:
Type | Description |
---|---|
CommonProperties
|
Common properties of the element |
GetDisplayName()
Get the displace name of the element
Returns:
Type | Description |
---|---|
str
|
Display name of the element |
GetDocument()
Get the document
Returns:
Type | Description |
---|---|
DocumentAdapter
|
Document |
GetDrawingfileNumber()
Get the drawing file number of the element
Returns:
Type | Description |
---|---|
int
|
Drawing file number of the element / negative means drawing is in passive mode |
GetElementAdapterType()
Get the type of the element
Returns:
Type | Description |
---|---|
ElementAdapterType
|
Type ID of the element |
GetElementUUID()
Get the UUID of the element
Returns:
Type | Description |
---|---|
GUID
|
UUID of the element |
GetGeometry()
Get elements geometry
Returns:
Type | Description |
---|---|
Any
|
Document |
GetGroundViewArchitectureElementGeometry()
Get ground view geometry of an architecture element (if exist)
Returns:
Type | Description |
---|---|
Any
|
Geometry |
GetModelElementUUID()
Get the UUID of the model element
Returns:
Type | Description |
---|---|
GUID
|
UUID of the element |
GetModelGeometry()
Get element model geometry
Returns:
Type | Description |
---|---|
Any
|
Geometry |
GetParentElementAdapterType()
Get the type of the parent element
Returns:
Type | Description |
---|---|
ElementAdapterType
|
Type ID of the parent element |
GetPureArchitectureElementGeometry()
Get the pure geometry of an architecture element (if exist). The geometry is without openings, ...
Returns:
Type | Description |
---|---|
Any
|
Geometry |
GetTimeStamp()
Get the time stamp of the element
Returns:
Type | Description |
---|---|
int
|
Time stamp of the element creation |
Is3DElement()
Get the 3D state of the element
Returns:
Type | Description |
---|---|
bool
|
Element is a 3D element: true/false |
IsActive()
Get the activation state of the element
Returns:
Type | Description |
---|---|
bool
|
True, if the element is activated |
IsChildParentType(childType, parentType)
Check for child (current element) and parent type connection
Parameters:
Name | Type | Description | Default |
---|---|---|---|
childType
|
GUID
|
Type of the element |
required |
parentType
|
GUID
|
Type of the parent element |
required |
IsDeleted()
Get the deleted state of the element
Returns:
Type | Description |
---|---|
bool
|
True, if the element is deleted |
IsGeneralElement()
Check if element is general (PRGBER_ELEM_ALLG)
Returns:
Type | Description |
---|---|
bool
|
Element is general (PRGBER_ELEM_ALLG) |
IsInActiveDocument()
If element is in active document return true.
Returns:
Type | Description |
---|---|
bool
|
true if element is in active document |
IsInActiveLayer()
If element is in active layer return true.
Returns:
Type | Description |
---|---|
bool
|
true if element is in active layer. |
IsInMacro()
Check if element has parent object
Returns:
Type | Description |
---|---|
bool
|
Element has parent |
IsLabelElement()
Check if element is a part of some label (Variables Textbild)
Returns:
Type | Description |
---|---|
bool
|
Element is a part of some label: true/false |
IsNull()
Check for an empty element
Returns:
Type | Description |
---|---|
bool
|
Element is empty: true/false |
IsValidForSelectFace()
Check if element is valid for face select
Returns:
Type | Description |
---|---|
bool
|
Element is valid for face select |
SetVisibilityState(visible)
Set the visibility state of the element
Parameters:
Name | Type | Description | Default |
---|---|---|---|
visible
|
bool
|
She visibility state to set |
required |
__eq__
overload
__eq__(element)
Equal operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element
|
BaseElementAdapter
|
Element to compare |
required |
Returns:
Type | Description |
---|---|
bool
|
Elements are equal: true/false |
__eq__(eleTypeUUID)
Equal operator for checking the element adapter type UUID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eleTypeUUID
|
GUID
|
Element type UUID |
required |
__init__
overload
__init__()
Initialize
__init__(element)
Copy constructor
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element
|
BaseElementAdapter
|
Element |
required |
__ne__
overload
__ne__(eleType)
Not equal operator for checking the element type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eleType
|
BaseElementAdapter
|
Element type |
required |
__ne__(eleType)
Not equal operator for checking the element type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eleType
|
GUID
|
Element type |
required |
__repr__()
Convert to string