icon

Forum Allplan

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,

Allegati (1)

Type: text/x-script.python
324 scaricato
Size: 5,16 KiB

Show most helpful answer Hide most helpful answer

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

11 - 11 (11)

Hi Bart,

Happy to know you are working on this already.
I am always happy to help.

Best Regards,
Nery

11 - 11 (11)