-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetSetParameter.py
More file actions
39 lines (25 loc) · 940 Bytes
/
Copy pathGetSetParameter.py
File metadata and controls
39 lines (25 loc) · 940 Bytes
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
"""
Create a simple Wall objects using python
"""
__author__ = 'Onur Korkmaz'
"""
Sample on how to create a Wall.
Use this sample along with the Video on Youtube.
"""
doorCat = UnwrapElement(IN[0])
result = []
#FilteredElementCollector
Collector = FilteredElementCollector(doc,doc.ActiveView.Id)
filter = ElementCategoryFilter(BuiltInCategory.OST_Doors)
doors = Collector.OfCategoryId(doorCat.Id).FirstElement()
parameters = doors.GetOrderedParameters()
for i in parameters:
result.append(i.Definition.BuiltInParameter)
doorlvlp = doors.get_Parameter(BuiltInParameter.DOOR_FRAME_MATERIAL)
## storage type AsString() , AsDouble()
parameter_strogetype = doorlvlp.StorageType
parameter_value = doorlvlp.AsString()
TransactionManager.Instance.EnsureInTransaction(doc)
doorlvlp.Set("WOOD")
TransactionManager.Instance.TransactionTaskDone()
OUT = wall , doors , parameters , result ,doorlvlp ,parameter_strogetype , parameter_value