Is there a possibility to read the workplane or the host level of the Room Separation lines ? For instance when there are multiple levels very close to each other and the Room Separation lines are placed in the respective levels, its hard to find them in the floor plans when not looked in to the right Level.
Totally forgot about this problem. After digging few forums found that the every “Lines” category is drawn on Sketch Plane, so one could know the level of the “Room Separation” Lines using the “SketchPlane.Name” function.
roomLine = UnwrapElement(IN[0])
OUT = roomLine.SketchPlane.Name
can it be changed to another level? i tried w/ following but nothing happen
import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
spaceLines = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
try:
for i in spaceLines:
i.SketchPlane.Name = IN[1]
except:
pass
TransactionManager.Instance.TransactionTaskDone()
i tried i.SketchPlane = IN[1] in which new sketch plane based on new level is used for input, not working
i assume separator lines need to be recreated, isn’t it?
in fact, i did recreate separator lines but they are still old level based
thanks Raja, my problem is how to re-host room/space separation line from one level to another level?
i can set new sketch-plane for room/space separation line but it won’t necessarily associate to new level even though that new sketch-plane is based on new level, perhaps i missed something simple here?
doc = DocumentManager.Instance.CurrentDBDocument
spaceLines = UnwrapElement(IN[0])
TransactionManager.Instance.EnsureInTransaction(doc)
x = “”
try:
for i in spaceLines: #i.SketchPlane = IN[1]
i.SetSketchPlaneAndCurve(In[1], i.GeometryCurve)
except: #pass
x = “oops”
TransactionManager.Instance.TransactionTaskDone()
OUT = spaceLines, x
As far as I know changing the SketchPlane of Room separation lines aren’t allowed.
Alternatively you could create the Room separation lines to new level from existing/reference curves using Clockwork package. You can refer to this link