Skip to content

NemAll_Python_BaseElements

Exposed classes and functions from NemAll_Python_BaseElements

ClearElementPreview

ClearElementPreview()

Clear the element preview

CloseElementPreview

CloseElementPreview()

Close the element preview

CopyElements

CopyElements(
    doc: DocumentAdapter,
    elements: BaseElementAdapterList,
    fromPoint: Point3D,
    distanceVector: Vector3D,
    rotationVector: Vector3D,
    rotationAngle: float,
    numberOfCopies: int,
    viewProj: ViewWorldProjection,
) -> BaseElementAdapterList

Copy the elements

Returns:

Parameters:

CreateAssociativeViews

CreateAssociativeViews(
    doc: DocumentAdapter,
    insertionMat: Matrix3D,
    elements: BaseElementAdapterList,
    assoViewList: list,
    viewProj: ViewWorldProjection,
) -> MinMax2DList

Create associative views

Parameters:

CreateBarCoupler

CreateBarCoupler(
    arg2: BaseElementAdapterList,
    arg3: str,
    arg4: str,
    arg5: str,
    arg6: str,
    arg7: bool,
)

CreateElements

CreateElements(
    doc: DocumentAdapter,
    insertionMat: Matrix3D,
    modelEleList: list,
    modelUuidList: list,
    assoRefObj: object,
    appendReinfPosNr: bool = True,
    createUndoStep: bool = True,
) -> BaseElementAdapterList

Create the elements in the drawing file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • insertionMat (Matrix3D) –

    Matrix with the placement point and the rotation

  • modelEleList (list) –

    List with the model elements modelUuidList List with the model UUIDS in modification mode

  • assoRefObj (object) –

    reference to an associative view

  • appendReinfPosNr (bool, default: True ) –

    Set to True to append the reinforcement position numbers to the existing position numbers. Set to False to try to use the original reinforcement position numbers

  • createUndoStep (bool, default: True ) –

    Create an undo step after the creation of the PythonPart

Returns:

CreateLayer

CreateLayer(
    doc: DocumentAdapter,
    groupName: str,
    subGroupName: str,
    longName: str,
    shortName: str,
    lineColorID: int,
    lineThicknessID: int,
    lineStyleID: int,
    bVisible: bool,
    bModifiable: bool,
) -> int

Create a new layer

Parameters:

  • doc (DocumentAdapter) –

    Document

  • groupName (str) –

    Group name

  • subGroupName (str) –

    Subgroup name

  • lineColorID (int) –

    Line color ID of the layer

  • lineThicknessID (int) –

    Line thickness ID of the layer

  • lineStyleID (int) –

    Line style ID of the layer

  • bVisible (bool) –

    Layer is visible

  • bModifiable (bool) –

    Layer is modifiable

Returns:

  • int

    Created layer number

CreateLibraryElement

CreateLibraryElement(
    doc: DocumentAdapter, insertionMat: Matrix3D, path: str, elementName: str
) -> BaseElementAdapterList

Create a library element in the data base

Returns:

Parameters:

  • doc (DocumentAdapter) –

    Document

  • insertionMat (Matrix3D) –

    Matrix with the placement point and the rotation

  • path (str) –

    Path of the library element

  • elementName (str) –

    Name of the library element

CreateSectionsAndViews

CreateSectionsAndViews(
    doc: DocumentAdapter,
    insertionMat: Matrix3D,
    elements: BaseElementAdapterList,
    sectionViewList: list,
    viewProj: ViewWorldProjection,
    undoRedoService: object | None = None,
) -> MinMax2DList

Create a unified section or view

Parameters:

  • doc (DocumentAdapter) –

    Document

  • insertionMat (Matrix3D) –

    Placement matrix

  • elements (BaseElementAdapterList) –

    List with the elements

  • sectionViewList (list) –

    List with the sections and views

  • viewProj (ViewWorldProjection) –

    View world projection

  • undoRedoService (object | None, default: None ) –

    Undo redo service

Returns:

  • MinMax2DList

    list of boundaries of the created views and sections

DeleteElements

DeleteElements(doc: DocumentAdapter, elements: BaseElementAdapterList)

Delete the elements

Parameters:

DrawElementPreview

DrawElementPreview(
    doc: DocumentAdapter,
    insertionMat: Matrix3D,
    modelEleList: list,
    bDirectDraw: int,
    assoRefObj: object,
    asStaticPreview: bool = False,
    addToPreviewBoundingBox: bool = True,
)

Draw the preview of the elements

Parameters:

  • doc (DocumentAdapter) –

    Document

  • insertionMat (Matrix3D) –

    Matrix with the placement point and the rotation

  • modelEleList (list) –

    List with the model elements

  • bDirectDraw (int) –

    Direct draw of the preview elements to the screen

  • assoRefObj (object) –

    Associative view reference object

  • asStaticPreview (bool, default: False ) –

    Draw as static preview: true/false

  • addToPreviewBoundingBox (bool, default: True ) –

    Add the elements to the bounding box of the preview

ElementTransform overloaded

ElementTransform(transMat: Matrix3D, modelEleList: list)

Transform the model elements

Parameters:

  • transMat (Matrix3D) –

    Transformation matrix

  • modelEleList (list) –

    List with the model elements

ElementTransform(
    transVec: Vector3D,
    xAngle: float,
    yAngle: float,
    zAngle: float,
    modelEleList: list,
)

Transform the model elements

Parameters:

  • transVec (Vector3D) –

    Transformation vector

  • xAngle (float) –

    Rotation angle around the x-axis

  • yAngle (float) –

    Rotation angle around the y-axis

  • zAngle (float) –

    Rotation angle around the z-axis

  • modelEleList (list) –

    List with the model elements

ExecutePreviewDraw

ExecutePreviewDraw(doc: DocumentAdapter)

Trigger the draw of the preview in the viewport

Parameters:

ExplodeIFCSmartSymbols

ExplodeIFCSmartSymbols(
    doc: DocumentAdapter, elements: BaseElementAdapterList
) -> BaseElementAdapterList

Explode smart symbols with an existing IFC ID oder IFC object type

Returns:

Parameters:

ExplodeSmartSymbols

ExplodeSmartSymbols(elements: BaseElementAdapterList) -> BaseElementAdapterList

Explode the smart symbols

Returns:

Parameters:

GetColorById

GetColorById(id: int) -> ARGB

Get the ARGB color by the color ID

Parameters:

  • id (int) –

    color ID

Returns:

  • ARGB

    ARGB color

GetElement

GetElement(element: BaseElementAdapter) -> object

Get the PythonParts element

Returns:

  • object

    PythonParts element

Parameters:

GetElements

GetElements(elementsList: BaseElementAdapterList) -> list

Get Python objects out of element adapters

Parameters:

Returns:

  • list

    List of python objects

GetIdByColor

GetIdByColor(color: ARGB) -> int

Get the color ID by the ARGB color

Parameters:

  • color (ARGB) –

    ARGB color

Returns:

  • int

    color ID

GetMinMaxBox

GetMinMaxBox(
    elements: BaseElementAdapterList,
    axisAngle: float = 0.0,
    only3DElements: bool = 0.0,
) -> MinMax3D

Get the min/max box of the elements

Parameters:

  • elements (BaseElementAdapterList) –

    List with the elements

  • axisAngle (float, default: 0.0 ) –

    Angle of the x axis for the min/max calculation

  • only3DElements (bool, default: 0.0 ) –

    Use only 3D elements

Returns:

  • MinMax3D

    Min/max box of the elements

GetViewMatrices

GetViewMatrices(doc: DocumentAdapter)

Get the associative view matrices

Returns:

  • Associative view matrices

Parameters:

ModifyElements

ModifyElements(doc: DocumentAdapter, modelEleList: list)

Modify the elements

Parameters:

RotateElements

RotateElements(
    doc: DocumentAdapter,
    elements: BaseElementAdapterList,
    refPnt: Point2D,
    rotAngle: float,
    viewProj: ViewWorldProjection,
)

Rotate the elements

Parameters:

ScaleElements

ScaleElements(
    doc: DocumentAdapter,
    elements: BaseElementAdapterList,
    refPnt: Point3D,
    scaleX: float,
    scaleY: float,
    scaleZ: float,
    theta: Angle,
    viewProj: ViewWorldProjection,
)

Scale the elements

Parameters:

  • doc (DocumentAdapter) –

    Document

  • elements (BaseElementAdapterList) –

    List with the UUIDs of the data base elements

  • refPnt (Point3D) –

    Reference point of the scaling

  • scaleX (float) –

    Scale factor in x direction

  • scaleY (float) –

    Scale factor in y direction

  • scaleX (float) –

    Scale factor in x direction

  • theta (Angle) –

    Rotation angle in Z-axis

  • viewProj (ViewWorldProjection) –

    View world projection

Placeholder