0 list is an Autodesk.Revit.DB.ElementId
1 list is a number
How do I get 1 to output the Autodesk.Revit.DB.ElementId?
0 list is an Autodesk.Revit.DB.ElementId
1 list is a number
How do I get 1 to output the Autodesk.Revit.DB.ElementId?
@Alien ,
did you load libraries also ?
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Preparing input from dynamo to revit
views = UnwrapElement(IN[0])
ids = []
for i in views:
ids.Add(i.Id)
OUT = ids
KR
Andreas
Hello, I don’t know if this is what you are looking for
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.UI import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc = uiapp.ActiveUIDocument
views=UnwrapElement(IN[0])
v_Id=[int(v.Id.ToString()) for v in views]
v_Id_revit=[v.Id for v in views]
OUT = v_Id,v_Id_revit
cordially
christian.stan
It was because I didn’t unwrap!! Doh!
Thank you
@Alien ,
the small things