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] Duplicated reinforcement in PythonPartGroup - refresh problem

Schlagworte:
  • Pythonpart
  • PythonPartGroup
  • Reinforcement

Hello,

I'm trying to solve an issue with my interactor that creates a PythonPartGroup containing reinforcement.

The general idea is to create several PythonParts with geometry and reinforcement, and then group them into a PythonPartGroup, as shown below:

          #Create reinforcement as PythonPart
     pyp_util = PythonPartUtil()
     pyp_util.add_reinforcement_elements(reinforcement_list)
     reinf_PP = pyp_util.get_pythonpart(build_ele)

          #Collect PythonParts to create PythonPartGroup
     pythonpart_group = PythonPartGroup.from_build_ele(build_ele)
     pythonpart_group.append(bottom_plate_PP) #bottom_plate_PP created in a different place as PythonPart
     pythonpart_group.append(reinf_PP)

     return pythonpart_group.create()
     

Everything works fine, except for one issue: when I modify the PythonPartGroup, the geometry and reinforcement within the PythonParts are updated correctly, but the reinforcement from the previous state remains visible in the viewport. However, it isn’t "real" reinforcement, as it disappears if I use the "Reorganize Drawing File" command.

I encountered the same behavior when using the "old" method for creating PythonPartGroups (not using pyp_util). I’m wondering if this is "normal" behavior or if there’s a way to refresh the duplicated reinforcement automatically so it clears from the viewport without needing to reorganize the drawing file.

Hope above is clear, any hints would be greatly appreciated!

Kind regards,

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Zitiert von: Karol_Janeczko
Could you please perform a quick test as follows:
1.Place the PP in the model.

2.Change the column width.

3.Confirm.

Then, try to move the modified PP_Group aside. Do you also see this "duplicated in 2D only reinforcment" effect?

Hi Karol,

yes, I could reproduce it. Seems that this is a bug, that needs to be addressed. Thank you for your feedback!

Best,
Bart

Hi Karol,

as you have created an interactor I assume you are also handling the preview generation yourself. Are you using the PythonPartPreview class for it? The issue might be caused by not terminating the preview draw correctly. Especially, if the preview is static. Maybe calling the PythonPartPreview.close() at the end could help.

Let us know, if that helped.
Best,
Bart

Hello Bart,

Thank you for your support!

I tested PythonPartPreview.close() without success :/
However, in the PP Example library, I found a good example (Standard PythonPart not Interactor):

ReinforcementExamples -> ColumnGroup

It includes a simple example with PP_geo + PP_reinf = PP_Group.

Could you please perform a quick test as follows:

1.Place the PP in the model.
2.Change the column width.
3.Confirm.
Then, try to move the modified PP_Group aside. Do you also see this "duplicated in 2D only reinforcment" effect?

Best regards

Zitiert von: Karol_Janeczko
Could you please perform a quick test as follows:
1.Place the PP in the model.

2.Change the column width.

3.Confirm.

Then, try to move the modified PP_Group aside. Do you also see this "duplicated in 2D only reinforcment" effect?

Hi Karol,

yes, I could reproduce it. Seems that this is a bug, that needs to be addressed. Thank you for your feedback!

Best,
Bart