Python Forum
IFC entities extracted twice
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IFC entities extracted twice
#5
(Mar-19-2019, 02:26 AM)micseydel Wrote: As Larz said, you should be posting in code tags. You're far less likely to get a reply if people have to go off-site. Also, I haven't looked at the links but the shorter the code the better - if you can reproduce your problem in 5-10 runnable lines of code rather than hundreds, you'll be substantially more likely to get a reply (and faster at that).

Thank you for your reply. I will definitely use BBCodes while posting any question.

from __future__ import print_function

f = ifc.open("C:\Users\GURBHEJ SINGH\Desktop\Beam_Material.ifc")
f2 = ifc.open("test22.ifc")


directions = f.by_type("ifcdirection")
for direction in directions:
   f2.add(direction)

beams = f.by_type("IFCBEAM")
for beam in beams:
   f2.add(beam)

f2.write("test22.ifc")
Error:
Traceback (most recent call last): File "C:\Users\GURBHEJ SINGH\Downloads\python\Abcdef.py", line 3, in <module> f = ifc.open("C:\Users\GURBHEJ SINGH\Desktop\Beam_Material.ifc") NameError: name 'ifc' is not defined
Please help me to solve the issue.
Thank you.
Reply


Messages In This Thread
RE: Help with Python and ifcopenshell - by Larz60+ - Mar-17-2019, 07:17 AM
RE: Help with Python and ifcopenshell - by gurbhej_singh - Mar-19-2019, 03:38 AM
IFC entities extracted twice - by gurbhej_singh - Apr-11-2019, 09:25 AM
RE: IFC entities extracted twice - by Larz60+ - Apr-12-2019, 12:38 AM
RE: Help with Python and ifcopenshell - by Larz60+ - Apr-11-2019, 09:42 AM
RE: Help with Python and ifcopenshell - by Larz60+ - Apr-11-2019, 02:36 PM
RE: Help with Python and ifcopenshell - by Larz60+ - Apr-11-2019, 10:08 PM
RE: Help with Python and ifcopenshell - by Larz60+ - Apr-11-2019, 11:56 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  naming entities(city abbreviations) tirumalaramakrishna 1 1,338 May-06-2022, 11:22 AM
Last Post: jefsummers
  How to couunt extracted values ? Eidrizi 0 1,561 Sep-10-2020, 06:05 AM
Last Post: Eidrizi
  instaloaders problem: search certain hashtag - posts without hashtag extracted ledgreve 0 2,241 Nov-18-2019, 01:22 PM
Last Post: ledgreve
  Seperate entities in text file bigdazza 1 2,936 Jun-02-2018, 03:15 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020