Skip to content

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

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

Returns:

Type Description
BaseElementAdapterList

List with the created 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 modelUuidList List with the model UUIDS in modification mode

required
assoRefObj object

Associative view reference object

required
appendReinfPosNr bool

True: Append the reinforcement position numbers to the existing position numbers

True
False

: Try to use the original reinforcement position numbers

required
createUndoStep bool

Create an undo step after the creation of the PythonPart

True

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

Returns:

Type Description
BaseElementAdapterList

List with the created elements

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

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

List with the sections and views

required
viewProj ViewWorldProjection

View world projection undoRedoService Undo redo service

required

DeleteElements(doc, elements)

Delete the elements

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
elements BaseElementAdapterList

List with the UUIDs of the data base elements

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 bDirectDraw Direct draw of the preview elements to the screen

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 oder IFC object type

Returns:

Type Description
BaseElementAdapterList

List with the exploded elements

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
elements BaseElementAdapterList

Elements to explode

required

ExplodeSmartSymbols(elements)

Explode the smart symbols

Returns:

Type Description
BaseElementAdapterList

List with the exploded elements

Parameters:

Name Type Description Default
elements BaseElementAdapterList

Elements to explode

required

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

Returns:

Type Description
list

PythonParts elements

Parameters:

Name Type Description Default
elementsList BaseElementAdapterList

Elements as BaseElementAdapterList

required

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=0.0)

Get the min/max box of the elements Returns: Min/max box of the elements

Parameters:

Name Type Description Default
doc

Document

required
elements BaseElementAdapterList

List with the elements

required
axisAngle float

Angle of the x axis for the min/max calculation

0.0
only3DElements bool

Use only 3D elements

0.0

GetViewMatrices(doc)

Get the associative view matrices

Returns:

Type Description

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