icon

Support Forum

Create assemblies


Dear all,

I am currently trying to create a set of specifically named assemblies using "AllplanPrecast.AssemblyGroupElement" after selecting multiple components of an imported .ifc model using "MultiElementSelectInteractor()"

Unfortunately, I have not been able to do it. I am currently trying to follow the script example "AssemblyGroupPlacement". Please check the enclosed script . The script runs without throwing an error, but the created assembly is not listed in the objects palette.

Is this achievable with AllplanPrecast.AssemblyGroupElement?
Is the fact that I am working with an ifc model an issue here?

Looking forward to hearing from you

Cheers,

Anhänge (1)

CreateAssembly.py
Erweiterung der Datei passt nicht zum Inhalt!
Typ: text/x-script.python
0-mal heruntergeladen
Größe: 5,16 KiB

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Hi,

attaching scripts is not allowed, you have to change the extension to .txt for example.

Since I cannot look into the script, IDK what you are trying to put into the assembly. AFAIK, AssemblyGroup requires three lists:

  • one consisting of FixtureElement objects
  • one consisting of ReinforcementElement objects
  • one consisting of LibraryElement objects

What you get from the selection is a BaseElementAdapterList. You would need to extract all these objects from BaseElementAdapterList using GetElements. But:

  • You cannot get a LibraryElement from an BaseElementAdapter. LibraryElements can only be created new based on path to a .sym file
  • I think you can get a FixtureElement, but I am not sure if all the information are read
  • Getting a BarPlacement (which is ReinforcementElement) object is possible but tricky

So please provide more information. Maybe example drawing file would be helpful.

Cheers,
Bart

Hi,

attaching scripts is not allowed, you have to change the extension to .txt for example.

Since I cannot look into the script, IDK what you are trying to put into the assembly. AFAIK, AssemblyGroup requires three lists:

  • one consisting of FixtureElement objects
  • one consisting of ReinforcementElement objects
  • one consisting of LibraryElement objects

What you get from the selection is a BaseElementAdapterList. You would need to extract all these objects from BaseElementAdapterList using GetElements. But:

  • You cannot get a LibraryElement from an BaseElementAdapter. LibraryElements can only be created new based on path to a .sym file
  • I think you can get a FixtureElement, but I am not sure if all the information are read
  • Getting a BarPlacement (which is ReinforcementElement) object is possible but tricky

So please provide more information. Maybe example drawing file would be helpful.

Cheers,
Bart

Hi,

Much appreciated for the timely reply. My apologies for the uploaded .py file. Please find enclosed the script in a .txt file format.

Please let me know what your thoughts are on the enclosed script.

In the meantime, I will take a look at the information you provided, and I'll see if I can create an assembly using multi-element select interactor.

Cheers.

Anhänge (1)

CreateAssembly.txt
Erweiterung der Datei passt nicht zum Inhalt!
Typ: text/x-script.python
0-mal heruntergeladen
Größe: 5,53 KiB