Hi,
The API PickObject function doesn't work anymore with Revit 2013.
I tried to edit the code with help of the migrating blog post of Jeremy's, but without succes.
This is the code:
SheetFilter selFilter = new SheetFilter(); Selection sel = uiapp.ActiveUIDocument.Selection; pickedRef = sel.PickObject(ObjectType.Element, selFilter, "Select sheet."); Element elema = pickedRef.Element;
Its the pickedRef.Element; wich gives me an error.
Does someone know how to fix this?
Thanks!
Regards,
Joost
Solved! Go to Solution.
Solved by Revitalizer. Go to Solution.
Hi Joostschlebaum,
in Revit 2011 and 2012, yourReference.Element can be used,
in 2013, you need to use
yourDocument.GetElement(yourReference.ElementId).
Cheers,
Revitalizer