I recently wrote a short introductory tutorial for parsing IFC files with IfcOpenShell and Python on my blog here:
https://thinkmoult.com/using-ifcopenshe ... ython.html
I thought users on this forum might find it useful as an introduction. It's a really simply library and great for querying IFC files to check if their contents are correct.
Enjoy!
Intro tutorial for parsing IFC files with IfcOpenShell and Python
Intro tutorial for parsing IFC files with IfcOpenShell and Python
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
Re: Intro tutorial for parsing IFC files with IfcOpenShell and Python
Amazing tutorial! Did the ifcopenshell people see it?
Re: Intro tutorial for parsing IFC files with IfcOpenShell and Python
I suspect that they did, as I crossposted this on the building smart forums, and @aothms (ifcopenshell main dev) liked the post
https://forums.buildingsmart.org/t/shor ... shell/1021
https://forums.buildingsmart.org/t/shor ... shell/1021
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
Re: Intro tutorial for parsing IFC files with IfcOpenShell and Python
oh Yeah
I really like it too.
I really like it too.
-
- Posts: 1
- Joined: Thu Aug 15, 2019 7:44 am
Re: Intro tutorial for parsing IFC files with IfcOpenShell and Python
Great to read such positive feedback, however I cannot get the tutorial started on my macOS 10.14 while using PyCharm as IDE.
What am I doing wrong?
- Pathways?
- Interpreter / environment / version?
Please any advice, I have also opened a topic on SO:
https://stackoverflow.com/questions/575 ... or-further
What am I doing wrong?
- Pathways?
- Interpreter / environment / version?
Please any advice, I have also opened a topic on SO:
https://stackoverflow.com/questions/575 ... or-further
Re: Intro tutorial for parsing IFC files with IfcOpenShell and Python
YouGood morning 3D_GeoSpatialEng!
You have not sufficiently described your scenario for us to give useful feedback. Let's start with the basics - you will need to run a python interpreter and import the ifcopenshell program.
Can you try the following, and describe exactly what you are doing, and what happens on the computer as a result (be sure to include any error messages exactly as they are shown).
1. Forget PyCharm for a moment, go and open up a new terminal.
2. Run the "python" command - if successful, it should start an interactive interpreter where you can start typing in python code. It will also tell you what version of python you have: please tell us what this version is.
3. If the python command is successful, can start typing, such as "print('foo')" and press enter and it will result in the message "foo" being displayed. if that works, try typing "import ifcopenshell" and press enter. If successful, there will be no message. If it fails, it will say something like module not found. Let us know.
4. If it says it cannot find the ifcopenshell module, type in "import sys", press enter. This would should work and not display any success message. Then type "sys.path" and press enter. You should tell us exactly what this command outputs.
Feel free to contact me on https://mastodon.social/@thinkMoult for more rapid responses, or on the #freecad or ##architect channel on irc.freenode.net. I also use XMPP.
You have not sufficiently described your scenario for us to give useful feedback. Let's start with the basics - you will need to run a python interpreter and import the ifcopenshell program.
Can you try the following, and describe exactly what you are doing, and what happens on the computer as a result (be sure to include any error messages exactly as they are shown).
1. Forget PyCharm for a moment, go and open up a new terminal.
2. Run the "python" command - if successful, it should start an interactive interpreter where you can start typing in python code. It will also tell you what version of python you have: please tell us what this version is.
3. If the python command is successful, can start typing, such as "print('foo')" and press enter and it will result in the message "foo" being displayed. if that works, try typing "import ifcopenshell" and press enter. If successful, there will be no message. If it fails, it will say something like module not found. Let us know.
4. If it says it cannot find the ifcopenshell module, type in "import sys", press enter. This would should work and not display any success message. Then type "sys.path" and press enter. You should tell us exactly what this command outputs.
Feel free to contact me on https://mastodon.social/@thinkMoult for more rapid responses, or on the #freecad or ##architect channel on irc.freenode.net. I also use XMPP.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.