icon

Support Forum

[Frage] Control automatic dimensioning when creating a section

Schlagworte:
  • Allplan
  • 2026
  • PythonParts
  • Views
  • And
  • Sections

Hello,
I'm working on a PythonPart (Allplan 2026) that generates elevation and section views on a user-defined structural grid. Each view is created by building a NemAll_Python_BasisElements.ViewSectionElement with a custom ClippingPath and SectionGeneralProperties, then passing it to:
pythonAllplanBaseElements.CreateSectionsAndViews(doc, matrix, elements, [view], vwp)
This works well for the geometry and labeling. However, every generated UVS automatically receives two default horizontal dimension lines (the outer bounding-box dimensions).
In the "Modify section" dialog I can change the Dimensioning setting to OFF manually (the first of the four radio icons in the Dimensioning row — OFF / Normal / Elevation / Rules). For my use case (architectural elevation drawings on a precast context) I would like to have this set to OFF from the start, at creation time, without post-processing.
I've tried the following approaches from Python, all unsuccessful:

Setting view.DimensionElements = [] before CreateSectionsAndViews — the assignment is accepted but the engine repopulates the list anyway.
Setting view.SectionDefinitionData.DefinitionProperties = NemAll_Python_Precast.DimensioningProperties() — raises ArgumentError: the property only accepts UVS_SectionDefinitionProperties, which doesn't appear to be exposed to Python.
Assigning view.DimensioningProps = dim_props as a free Python attribute — silently accepted but not read by the engine.
Using NemAll_Python_Precast.View / ViewProperties / DimensioningProperties: these classes exist in the API stubs but I couldn't find any example (inside PythonPartsFramework, PythonPartsScripts, or the shipped Reinforcement scripts) that uses them to configure dimensioning on a UVS created via CreateSectionsAndViews.

Is there a supported way to:

(a) Set the Dimensioning radio to OFF at creation time?
(b) Alternatively, pass a Precast.ViewProperties with DimensioningProperties.Rules = [] to CreateSectionsAndViews or to the ViewSectionElement?
(c) Or — if the above is not yet exposed — any recommended workaround besides deleting the generated DimensionLineElement objects post-creation?

Any guidance would be very appreciated. Thanks.

You should first set the Dimensioning option to OFF manually in the Modify Section dialog before running the PythonPart. Allplan will save this setting as the default for the section/view creation.

After that, when you run the PythonPart, the generated sections should use the saved default settings, so the automatic dimension lines will not be created.