Functions of the module Base Elements
Module full path: NemAll_Python_BaseElements
Exposed classes and functions from NemAll_Python_BaseElements
ClearElementPreview()
Clear the element preview
CloseElementPreview()
Close the element preview
CopyElements(doc, elements, fromPoint, distanceVector, rotationVector, rotationAngle, numberOfCopies, viewProj)
Copy the elements
Returns:
Type | Description |
---|---|
BaseElementAdapterList
|
List with the copied elements |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
elements
|
BaseElementAdapterList
|
List with the elements |
required |
fromPoint
|
Point3D
|
From point |
required |
distanceVector
|
Vector3D
|
Distance vector |
required |
rotationVector
|
Vector3D
|
Rotation vector |
required |
rotationAngle
|
float
|
Rotation angle in radian |
required |
numberOfCopies
|
int
|
Number for copies |
required |
viewProj
|
ViewWorldProjection
|
View world projection |
required |
CreateAssociativeViews(doc, insertionMat, elements, assoViewList, viewProj)
Create associative views
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
insertionMat
|
Matrix3D
|
Placment matrix |
required |
elements
|
BaseElementAdapterList
|
List with the elements |
required |
assoViewList
|
List[AssociativeViewElement]
|
List with the associative views |
required |
viewProj
|
ViewWorldProjection
|
View world projection |
required |
CreateBarCoupler(arg2, arg3, arg4, arg5, arg6, arg7)
CreateElements(doc, insertionMat, modelEleList, modelUuidList, assoRefObj, appendReinfPosNr=True, createUndoStep=True)
Create the elements in the data base
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
insertionMat
|
Matrix3D
|
Matrix with the placement point and the rotation |
required |
modelEleList
|
List
|
List with the model elements |
required |
modelUuidList
|
List
|
List with the model UUIDS in modification mode |
required |
assoRefObj
|
object
|
Associative view reference object |
required |
appendReinfPosNr
|
bool
|
True to append the reinforcement position numbers to the existing position numbers, False to try to use the original reinforcement position numbers |
True
|
createUndoStep
|
bool
|
Create an undo step after the creation of the PythonPart |
True
|
Returns:
Type | Description |
---|---|
BaseElementAdapterList
|
List with the created elements |
CreateLayer(doc, groupName, subGroupName, longName, shortName, lineColorID, lineThicknessID, lineStyleID, bVisible, bModifiable)
Create a new layer
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
groupName
|
str
|
Group name |
required |
subGroupName
|
str
|
Subgroup name |
required |
lineColorID
|
int
|
Line color ID of the layer |
required |
lineThicknessID
|
int
|
Line thickness ID of the layer |
required |
lineStyleID
|
int
|
Line style ID of the layer |
required |
bVisible
|
bool
|
Layer is visible |
required |
bModifiable
|
bool
|
Layer is modifiable |
required |
Returns:
Type | Description |
---|---|
int
|
Created layer number |
CreateLibraryElement(doc, insertionMat, path, elementName)
Create a library element in the data base
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
insertionMat
|
Matrix3D
|
Matrix with the placement point and the rotation |
required |
path
|
str
|
Path of the library element |
required |
elementName
|
str
|
Name of the library element |
required |
Returns:
Type | Description |
---|---|
BaseElementAdapterList
|
List with the created elements |
CreateSectionsAndViews(doc, insertionMat, elements, sectionViewList, viewProj, undoRedoService=None)
Create sections and views
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
insertionMat
|
Matrix3D
|
Placment matrix |
required |
elements
|
BaseElementAdapterList
|
List with the elements |
required |
sectionViewList
|
List[ViewSectionElement]
|
List with the sections and views |
required |
viewProj
|
ViewWorldProjection
|
View world projection |
required |
undoRedoService
|
object
|
Undo redo service |
None
|
Returns:
Type | Description |
---|---|
MinMax2DList
|
list of boundaries of the created views and sections TODO: please check, if description correct |
DeleteElements(doc, elements)
Delete the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
elements
|
BaseElementAdapterList
|
List with the elements to delete |
required |
DrawElementPreview(doc, insertionMat, modelEleList, bDirectDraw, assoRefObj, asStaticPreview=False, addToPreviewBoundingBox=True)
Draw the preview of the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
insertionMat
|
Matrix3D
|
Matrix with the placement point and the rotation |
required |
modelEleList
|
List
|
List with the model elements |
required |
bDirectDraw
|
int
|
Direct draw of the preview elements to the screen TODO: argument type integer coorect? If yes, please provide explanation, what is the effect of providing values other than 0 |
required |
assoRefObj
|
object
|
Associative view reference object |
required |
asStaticPreview
|
bool
|
Draw as static preview: true/false |
False
|
addToPreviewBoundingBox
|
bool
|
Add the elements to the bounding box of the preview |
True
|
ElementTransform
overload
ElementTransform(transMat, modelEleList)
Transform the model elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
transMat
|
Matrix3D
|
Transformation matrix |
required |
modelEleList
|
List
|
List with the model elements |
required |
ElementTransform(transVec, xAngle, yAngle, zAngle, modelEleList)
Transform the model elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
transVec
|
Vector3D
|
Transformation vector |
required |
xAngle
|
float
|
Rotation angle around the x-axis |
required |
yAngle
|
float
|
Rotation angle around the y-axis |
required |
zAngle
|
float
|
Rotation angle around the z-axis |
required |
modelEleList
|
List
|
List with the model elements |
required |
ExecutePreviewDraw(doc)
Execute the preview drawing
ExplodeIFCSmartSymbols(doc, elements)
Explode smart symbols with an existing IFC ID or IFC object type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
elements
|
BaseElementAdapterList
|
Elements to explode |
required |
Returns:
Type | Description |
---|---|
BaseElementAdapterList
|
List with the exploded elements |
ExplodeSmartSymbols(elements)
Explode the smart symbols
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements
|
BaseElementAdapterList
|
Elements to explode |
required |
Returns:
Type | Description |
---|---|
BaseElementAdapterList
|
List with the exploded elements |
GetColorById(id)
Get the ARGB color by the color ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
int
|
color ID |
required |
Returns:
Type | Description |
---|---|
ARGB
|
ARGB color |
GetElements(elementsList)
Get the PythonParts elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elementsList
|
BaseElementAdapterList
|
Elements as BaseElementAdapterList |
required |
Returns:
Type | Description |
---|---|
List
|
PythonParts elements |
GetIdByColor(color)
Get the color ID by the ARGB color
Parameters:
Name | Type | Description | Default |
---|---|---|---|
color
|
ARGB
|
ARGB color |
required |
Returns:
Type | Description |
---|---|
int
|
color ID |
GetMinMaxBox(elements, axisAngle=0.0, only3DElements=False)
Get the min/max box of the elements Returns: Min/max box of the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements
|
BaseElementAdapterList
|
List with the elements |
required |
axisAngle
|
float
|
Angle of the x axis for the min/max calculation TODO: provide unit for the angle |
0.0
|
only3DElements
|
bool
|
Use only 3D elements |
False
|
GetViewMatrices(doc)
Get the associative view matrices
Returns:
Type | Description |
---|---|
None
|
Associative view matrices |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
ModifyElements(modelEleList)
Modify the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
modelEleList
|
List
|
Elements |
required |
RotateElements(doc, elements, refPnt, rotAngle, viewProj)
Rotate the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
elements
|
BaseElementAdapterList
|
List with the elements |
required |
refPnt
|
Point2D
|
Reference point of the rotation |
required |
rotAngle
|
float
|
Rotation angle |
required |
viewProj
|
ViewWorldProjection
|
View world projection |
required |
ScaleElements(doc, elements, refPnt, scaleX, scaleY, scaleZ, theta, viewProj)
Scale the elements
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
elements
|
BaseElementAdapterList
|
List with the UUIDs of the data base elements |
required |
refPnt
|
Point3D
|
Reference point of the scaling |
required |
scaleX
|
float
|
Scale factor in x direction |
required |
scaleY
|
float
|
Scale factor in y direction |
required |
scaleX
|
float
|
Scale factor in x direction |
required |
theta
|
Angle
|
Rotation angle in Z-axis |
required |
viewProj
|
ViewWorldProjection
|
View world projection |
required |