NemAll_Python_BaseElements
Exposed classes and functions from NemAll_Python_BaseElements
Functions:
-
ClearElementPreview–Clear the element preview
-
CloseElementPreview–Close the element preview
-
CopyElements–Copy the elements
-
CreateAssociativeViews–Create associative views
-
CreateBarCoupler– -
CreateElements–Create the elements in the drawing file
-
CreateLayer–Create a new layer
-
CreateLibraryElement–Create a library element in the data base
-
CreateSectionsAndViews–Create a unified section or view
-
DeleteElements–Delete the elements
-
DrawElementPreview–Draw the preview of the elements
-
ElementTransform–Overloaded function. See individual overloads.
-
ExecutePreviewDraw–Trigger the draw of the preview in the viewport
-
ExplodeIFCSmartSymbols–Explode smart symbols with an existing IFC ID oder IFC object type
-
ExplodeSmartSymbols–Explode the smart symbols
-
GetColorById–Get the ARGB color by the color ID
-
GetElement–Get the PythonParts element
-
GetElements–Get Python objects out of element adapters
-
GetIdByColor–Get the color ID by the ARGB color
-
GetMinMaxBox–Get the min/max box of the elements
-
GetViewMatrices–Get the associative view matrices
-
ModifyElements–Modify the elements
-
RotateElements–Rotate the elements
-
ScaleElements–Scale the elements
CopyElements
CopyElements(
doc: DocumentAdapter,
elements: BaseElementAdapterList,
fromPoint: Point3D,
distanceVector: Vector3D,
rotationVector: Vector3D,
rotationAngle: float,
numberOfCopies: int,
viewProj: ViewWorldProjection,
) -> BaseElementAdapterList
Copy the elements
Returns:
-
BaseElementAdapterList–List with the copied elements
Parameters:
-
doc(DocumentAdapter) –Document
-
elements(BaseElementAdapterList) –List with the elements
-
fromPoint(Point3D) –From point
-
distanceVector(Vector3D) –Distance vector
-
rotationVector(Vector3D) –Rotation vector
-
rotationAngle(float) –Rotation angle in radian
-
numberOfCopies(int) –Number for copies
-
viewProj(ViewWorldProjection) –View world projection
CreateAssociativeViews
CreateAssociativeViews(
doc: DocumentAdapter,
insertionMat: Matrix3D,
elements: BaseElementAdapterList,
assoViewList: list,
viewProj: ViewWorldProjection,
) -> MinMax2DList
Create associative views
Parameters:
-
doc(DocumentAdapter) –Document
-
insertionMat(Matrix3D) –Placment matrix
-
elements(BaseElementAdapterList) –List with the elements
-
assoViewList(list) –List with the associative views
-
viewProj(ViewWorldProjection) –View world projection
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:
-
BaseElementAdapterList–List with the created elements
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:
-
BaseElementAdapterList–List with the created elements
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:
-
doc(DocumentAdapter) –Document
-
elements(BaseElementAdapterList) –List with the UUIDs of the data base elements
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)
ExplodeIFCSmartSymbols
ExplodeIFCSmartSymbols(
doc: DocumentAdapter, elements: BaseElementAdapterList
) -> BaseElementAdapterList
Explode smart symbols with an existing IFC ID oder IFC object type
Returns:
-
BaseElementAdapterList–List with the exploded elements
Parameters:
-
doc(DocumentAdapter) –Document
-
elements(BaseElementAdapterList) –Elements to explode
ExplodeSmartSymbols
ExplodeSmartSymbols(elements: BaseElementAdapterList) -> BaseElementAdapterList
Explode the smart symbols
Returns:
-
BaseElementAdapterList–List with the exploded elements
Parameters:
-
elements(BaseElementAdapterList) –Elements to explode
GetColorById
GetColorById(id: int) -> ARGB
GetElement
GetElement(element: BaseElementAdapter) -> object
Get the PythonParts element
Returns:
-
object–PythonParts element
Parameters:
-
element(BaseElementAdapter) –Element as BaseElementAdapter
GetElements
GetElements(elementsList: BaseElementAdapterList) -> list
Get Python objects out of element adapters
Parameters:
-
elementsList(BaseElementAdapterList) –List of element adapters
Returns:
-
list–List of python objects
GetIdByColor
GetIdByColor(color: ARGB) -> int
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:
-
doc(DocumentAdapter) –Document
ModifyElements
ModifyElements(doc: DocumentAdapter, modelEleList: list)
RotateElements
RotateElements(
doc: DocumentAdapter,
elements: BaseElementAdapterList,
refPnt: Point2D,
rotAngle: float,
viewProj: ViewWorldProjection,
)
Rotate the elements
Parameters:
-
doc(DocumentAdapter) –Document
-
elements(BaseElementAdapterList) –List with the elements
-
refPnt(Point2D) –Reference point of the rotation
-
rotAngle(float) –Rotation angle
-
viewProj(ViewWorldProjection) –View world projection
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