| name | allplan-elements |
| description | This skill provides the foundational knowledge and high-level principles for defining native ALLPLAN elements (such as walls, lines, solids) within the ALLPLAN PythonParts framework. |
Skill: ALLPLAN Elements
High-Level Principles
1. AllplanElement Base Class
In order to create anything within the PythonParts framework, the to-be-created-element must be an AllplanElement (or a class inheriting from it). Whether you are creating a multi-layer architectural wall, a simple 2D line, or a generic 3D solid, all classes representing these model components stem from the abstract AllplanElement base class.
The API specializes AllplanElement into distinct branches:
- Basis elements (
BasisElement): Generic elements like lines, 3D-objects, hatchings, text, and library symbols.
- Architecture (
ArchElement): Native architectural elements like walls, slabs, beams, columns, and negative elements like window/door openings.
- Precast (
PrecastElement): Elements from the precast module (fixtures, assembly groups).
- Reinforcement (
ReinfElement): Components like rebars, meshes, and couplers.
2. Composition Over Inheritance (Geometry vs. Element)
Key insight: ALLPLAN entities compose geometry — they do not are geometry. Pure geometry objects (NemAll_Python_Geometry.Point3D, NemAll_Python_Geometry.Line2D, NemAll_Python_Geometry.Polyhedron3D, NemAll_Python_Geometry.BRep3D) carry only spatial coordinates. They have no color, no pen, no layer, and cannot be placed in a drawing file on their own. Every piece of geometry must be wrapped in an before it can exist in the model.
For example: