Created
February 9, 2017 13:12
Revisions
-
farialima created this gist
Feb 9, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ from __future__ import print_function import sys sys.path.append('ifcopenshell2x3') import ifcopenshell f = ifcopenshell.open(sys.args[1]) ids = [] def visit(inst, indent=''): print(indent, inst) if inst.id not in ids: ids.append(inst.id) for child in f.traverse(inst, 1)[1:]: visit(child, indent+' ') else: print(indent+' ', '...') for inst in f: visit(inst)