Question

Ifc entities extracted twice

  • 11 April 2019
  • 1 reply
  • 1 view

Badge

Greetings for the day,

 

I am working with IfcOpenShell and Python on the extraction of IFC entities. I have developed a Python code which I want to use to extract the structural model from the architectural model. But there is an issue which I am not able to understand and resolve because I am a beginner.

 

When I try to extract the entities which do not contain any entity written in bracket the code runs accurately.

 

for example:- #1=IFCPERSON($,$,'',$,$,$,$,$);

 

#2=IFCORGANIZATION($,'',$,$,$);

But the issue occurred when I want to extract the entities with previous entities written in Brackets

 

for example:- #3=IFCPERSONANDORGANIZATION(#1,#2,$);

The issue was that when I try to extract the entity for example "IFCPERSONANDORGANIZATION", the code will extract the "IFCPERSON" and "IFCORGANIZATION" twice if I have already extracted these two entities as done in the code given below.

Please help me with this issue.

 


1 reply

Userlevel 2
Badge +17

Hi @sidhucivil5932,

It would be a lot easier for you to use FME's IFC reader, rather than writing your own in Python. For more information on the IFC reader, please have a look at: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/ifc/ifc.htm

Reply