-
Notifications
You must be signed in to change notification settings - Fork 0
/
IfcSimplePropertyTemplate.py
55 lines (36 loc) · 1.61 KB
/
IfcSimplePropertyTemplate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import fme
import fmeobjects
from fmeobjects import FMELogFile
import ifcopenshell
import ifcopenshell.util.pset
from ifcopenshell import util
class FeatureProcessor(object):
def input(self, feature):
ifc = ifcopenshell.open(r'C:\Users\LorenERouth\Documents\CADtoBIM\IFC\Pset_IFC4_ADD2.ifc')
#simple_prop_template = ifc.by_type("IfcSimplePropertyTemplate")
#prop_template_list = []
#for n in simple_prop_template:
#prop_name = n[2]
#prop_template_list.append(prop_name)
#prop_template_list
#feature.setAttribute("PropertyTemplatenames", str(simple_prop_template))
pset_qto = util.pset.PsetQto("IFC4")
all_properties = pset_qto.get_applicable_names("IfcWall")
pset_wallcommon = pset_qto.get_by_name("Pset_WallCommon")
simple_props = pset_wallcommon[6]
prop_template_names = []
for n in simple_props:
prop_name = n[2]
prop_template_names.append(prop_name)
prop_template_names
feature.setAttribute("AllProperties", all_properties)
feature.setAttribute("PropertySetName", "Pset_WallCommon")
feature.setAttribute("IfcSimplePropertyTemplateList", str(prop_template_names))
feature.setAttribute("IfcSimpleProperties", str(simple_props))
#feature.setAttribute("AttNumber", classAttsLength) 6
feature.setAttribute("IfcSchema", "IFC4")
self.pyoutput(feature)
def close(self):
pass
def process_group(self):
pass