icon

Support Forum

[Frage] Changing layers/drawing files on multiple sections

Schlagworte:
  • Question
  • Allplan
  • 2026
  • PythonParts
  • Script
  • Sections
  • ClippingPath

Hi All,

I'm currently working on a PythonPart where I want to make multiple sections of the same section body but then for each one I have a different drawing files or Layer visible inside the view. The idea behind is that we can quickly make a phasing booklet.
At first I tried to take an existing view, then copy and then change either the layer or drawing files. But as far as I could find there is currently no possibility to that within the Allplan API.

Does anybody know if there is a way to change either the layer or drawing files of existing views within the Allplan API?

The workaround I currently have is that instead of taking the section, I’m now taking the clipping path and recreate it and making new views based on that. The main issue I have with this workaround is that for each section I create Allplan is also placing new clipping paths. Which results in multiple identical clipping paths, which is not ideal if you want to change your clipping path afterwards.

Is there a way within the Allplan API to make multiple sections with the same clipping path?

Thanks in advance.

Best regards,

Frenk

Does anybody know if there is a way to change either the layer or drawing files of existing views within the Allplan API?

Hi,

Sorry to tell, but reading or modifying existing views or sections is currently not possible via Python API. Only creation of new vies/sections is possible.

Is there a way within the Allplan API to make multiple sections with the same clipping path?

The only way to create a section, that refers to the same body, would be to create multiple instances of ViewSectionElement (the representation of a UVS), all composing exactly the same instance of a SectionDefinitionData (which in theory should represent the section body). If this approach doesn't work, and the created views each have their own body, I would assume, the API simply doesn't support that.

Best reagrds,
Bart