icon

Das Wissen aller Anwender nutzen

Im Allplan Connect Forum tauschen sich Anwender aus, geben wertvolle Tipps oder beraten sich bei ganz konkreten Aufgabenstellungen − auch international.
Und damit wirklich keine Frage unbeantwortet bleibt, unterstützen die Mitarbeiter des Technischen Supports ebenfalls aktiv das Forum.

Es erwarten Sie:

  • Foren-Vielfalt aus CAD Architektur, CAD Ingenieurbau uvm.
  • Tipps von User für User
  • international: Deutsch, Englisch, Italienisch, Französisch und Tschechisch

Melden Sie sich jetzt an und diskutieren Sie mit!

Zur Registrierung

[Frage] Issue visualizing multiple slabs

Schlagworte:
  • Slab
  • Pythonpart
  • Error
  • Views
  • 3D

Hi,

I'm having trouble visualizing slabs created with a PythonPart.

I am creating multiple slabs across different documents using a PythonPartTransaction. All slabs seem to be created correctly, as they are visible in the floor plan and wireframe views.

However, in the animation view, only the first slab created is visible, while the others do not appear.

Additional information:

  • The slabs are created in different documents
  • All documents are active at the time of creation
  • All elements are placed on the same layer

So far, I have verified that:

  • The slabs are correctly generated in each document
  • They are visible in 2D and top wireframe representation

Question:

Is there any known limitation or additional step required when creating elements across multiple documents using a PythonPartTransaction to ensure they are properly displayed in the animation view?

Any guidance would be appreciated.

Thank you.

Anhänge (3)

Typ: image/png
18-mal heruntergeladen
Größe: 90,19 KiB
Typ: image/png
6-mal heruntergeladen
Größe: 86,14 KiB
Typ: image/png
24-mal heruntergeladen
Größe: 53,93 KiB

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Hi

first issues, I can see on your code snippet (in the arguments of execute()) are:

  • You create an empty ViewWorldProjection, instead of getting one from self.coord_input.GetViewWorldProjection()
  • You create an empty modify_ele_list, instead of taking the self.modification_ele_list as is

The second one may caus issues, when you try to modify created PythonPart with double click - not really the problem you describe.

The first issue one might or might not be cause your problem. I would still try to resolve it.

Most likely though the issue is, that ALLPLAN is not able to create the 3D representation of that geometry. It seems, that the outline of your slab has many vertices. If they loop in wrong direction or cross-loop themselves, this may cause issues, when ALLPLAN tried to render 3D representation of them. Does the problem occur also on a simple geometry, like a polygon with 4 vertices only? In the attached image, the slab has many of them.

Cheers,
Bart

Hi

first issues, I can see on your code snippet (in the arguments of execute()) are:

  • You create an empty ViewWorldProjection, instead of getting one from self.coord_input.GetViewWorldProjection()
  • You create an empty modify_ele_list, instead of taking the self.modification_ele_list as is

The second one may caus issues, when you try to modify created PythonPart with double click - not really the problem you describe.

The first issue one might or might not be cause your problem. I would still try to resolve it.

Most likely though the issue is, that ALLPLAN is not able to create the 3D representation of that geometry. It seems, that the outline of your slab has many vertices. If they loop in wrong direction or cross-loop themselves, this may cause issues, when ALLPLAN tried to render 3D representation of them. Does the problem occur also on a simple geometry, like a polygon with 4 vertices only? In the attached image, the slab has many of them.

Cheers,
Bart

Hi Bart,

Thank you for your suggestions.

We applied the changes you mentioned in the PythonPartTransaction:

  • Using self.coord_input.GetViewWorldProjection() instead of creating an empty ViewWorldProjection
  • Using self.modification_ele_list instead of creating a new empty ModificationElementList

This aligns the transaction with the active view and the expected modification workflow of the interactor.

Regarding the slab geometry, we implemented a preprocessing step in our SlabManager.py to sanitize the 2D contour before creating the SlabElement:

  • Removal of consecutive duplicate vertices
  • Elimination of redundant closing points
  • Ensuring consistent orientation of the outer contour in XY

We also added warnings in cases where the polygon has a high number of vertices or fails validation.

However, after applying these changes, the behavior in the animation view remains the same. Only the first slab is visible, and the issue persists.

So in our case, these adjustments do not seem to resolve the problem or point directly to its root cause.

Do you have any other suggestions on what could be affecting the 3D representation in this scenario?
We would also be happy to share a small reproducible example if that helps to validate whether our approach is correct.

Best regards,

Hi,

I think we will not come over the simple example. Ideally, if it would create a rectangular slab. If it still fails this, something's wrong.

Cheers,
Bart