Hi everyone,
I'm developing a PythonPart that generates the reinforcement and the associated sections for a specific wall. For the horizontal sections I would like them to be created as a view from below (soffit), the same way our formwork plans show them.
I'm working in Allplan 2024.
I create the sections programmatically through AllplanBasisElements.CreateSectionsAndViews, building the SectionDefinitionData myself. To switch the horizontal cut to a view-from-below, I tried ClippingPathProperties.SectionType with the eHorizontalFromBelow enum value, but the setting has no visible effect — the generated section looks exactly like a normal top-down horizontal section.
This is roughly how I set the property (reduced to the essentials):
import NemAll_Python_BasisElements as AllplanBasisElements import NemAll_Python_Geometry as AllplanGeo # --- ClippingPathProperties --- clip_prop = AllplanBasisElements.ClippingPathProperties() clip_prop.IsHeightFromElementOn = False clip_prop.SectionIdentifier = str(section_id) clip_prop.BottomLevel = bottom_level clip_prop.TopLevel = top_level # This is the part that has no effect — trying to make it a view-from-below: clip_prop.SectionType = AllplanBasisElements.ClippingPathProperties.SectionType_Enum.eHorizontalFromBelow # also tried the plain integer (same enum value): clip_prop.SectionType = 3 # --- SectionDefinitionData --- section_definition = AllplanBasisElements.SectionDefinitionData() def_prop = AllplanBasisElements.SectionDefinitionProperties() def_prop.ClippingPathProperties = clip_prop section_definition.DefinitionProperties = def_prop section_definition.ClippingPath = clipping_path # rectangular polyline around the wall section_definition.DirectionVector = AllplanGeo.Vector3D(0, 0, -1) # section element then passed to AllplanBasisElements.CreateSectionsAndViews(...)
For reference, the enum from NemAll_Python_BasisElements.pyi:
class SectionType_Enum(enum.IntEnum):
eVertical = 1
eHorizontalFromAbove = 2
eHorizontalFromBelow = 3
I also tried setting SectionDefinitionData.HeightDirection to Vector3D(0, 1, 0) and (0, -1, 0), which made no difference either.
One more thing I noticed: I can't read the value back to confirm it's actually stored. The setter raises no exception, but the getter of ClippingPathProperties.SectionType throws:
Boost.Python.ArgumentError: Python argument types in
None.None(ClippingPathProperties)
did not match C++ signature:
None(class ClippingPathProperties_Base {lvalue})
So I can't verify whether the value reaches the object at all.
My questions:
Is ClippingPathProperties.SectionType the correct way to produce a view-from-below horizontal section through the PythonPart workflow in Allplan 2024, or am I setting it in the wrong place?
If SectionType is not the intended mechanism, what is the supported way to get a soffit for a programmatically created horizontal section?
Is the non-working getter on SectionType a known issue?
Any pointers would be much appreciated. Thanks!