ifcopenshell copy entities with additioanl pset from one model to another
HI all,
goal
copy entities with additional pset from one model to another
process
i have tried to copy entities using the following:
wall_copy_class = ifcopenshell.api.run("root.copy_class", model, product = wall)
then when passed this wall_copy_class in the following
psets = ifcopenshell.util.element.get_psets(wall_copy_class)
I was able to see my additional pset(LCA)
then I created a new model and used the .add() to place geometry, as well wall_copy_class. then use .write()
Here some picture
_why am I not able to move as well the additional PSET information? _
Comments
Hi @Johannes990 , have you tried to follow this example?
https://blenderbim.org/docs-python/ifcopenshell-python/code_examples.html#copy-an-entity-instance
There are 3 ways to copy class, you could try with all these three...
Also, are you sure that the wall with psets is the first also in the file "gopen"? Maybe when you added the wall it went to the end of the list...
I could be wrong, but maybe you have to add the inverse entities of the
wall_copy_class
object?Hi both ... first of all, thanks for spending time reading my code and rev. Next time I will make it more readable and as well copy/paste-able ( I will help you to help me :) )
@Massimo , yes I had only one object.
@theoryshaw, it works well... I was able to get what I needed thank you.