IFC in Sketchup

This forum section is only for IFC-related issues
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC in Sketchup

Post by yorik »

bernd wrote:For the relations instead get.argumet() you used getAttr(r,"RelatingObject"), getAttr(r,"RelatingStructure"), getAttr(r,"RelatedOpeningElement") ... I could not figure out how they do work? lines 160 to 170 in importIFC.py
It's the same thing... Actually, yes, I could use get_argument() there, don't know why I didn't... :)

One way to get a "generic" IFC schema, is this:

Code: Select all

import importIFC,ifcReader
schema = ifcReader.IfcSchema(importIFC.getSchema())
Then there are several methods in the schema object, to analyze the contents, for example:

Code: Select all

schema.getAttributes('IFCWALLSTANDARDCASE')
Of course it would be better to do that directly with ifcopenshell, but for the time being, it might be a solution... Other good point, that code is fully ours, so we can easily extend it.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC in Sketchup

Post by bernd »

Thanks Yorik, Got it.

ifcReader.py Never had a deep look into that file ... There allready is a funktion for propertysets :) ...

I must addmit as you said a few weeks ago "ifc is complicated" An object can have tons of properties and they are saved on many different places inside the ifc-file :cry: . But at least it is open AND documented :) .
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC in Sketchup

Post by yorik »

Exactly. There is no doubt that it's the best format available. We'll just need to cope with its difficulties, I guess... :)
Post Reply