-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathGrids.py
More file actions
24 lines (24 loc) · 771 Bytes
/
Grids.py
File metadata and controls
24 lines (24 loc) · 771 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
def getDbGrids(elementGrids): # Get Revit.DB.Reference from Grids
opt = Options()
opt.ComputeReferences = True
opt.IncludeNonVisibleObjects = True
opt.View = doc.ActiveView
dbGrids = []
for i in UnwrapElement(elementGrids):
f = (i.get_Geometry(opt))
for j in f:
if j.GetType() == Line:
dbGrids.append(j)
return dbGrids
def getRefArrayFromGrids(grids,doc):
refArray = ReferenceArray()
opt = Options()
opt.ComputeReferences= True
opt.IncludeNonVisibleObjects = True
opt.View = doc.ActiveView
for i in UnwrapElement(grids):
f = (i.get_Geometry(opt))
for j in f:
if j.GetType() == Line:
refArray.Append(j.Reference)
return refArray