Can anyone please tell me, why this code is not working for Revit 2013 ?
Document^ doc = commandData->Application->ActiveDocument;
id.Value = 132059;
Autodesk::Revit::Element^ selElement = doc->Element[id];
Selection^ sel = doc->Selection;
Some time ago I encountered something similar...I mean after adding element to selection didn't affect the document. Try following code...that's how I have managed to get it work...though it's long time ago.
ents->Clear(); SelElementSet ^elemSet = SelElementSet::Create(); elemSet->Insert(element); m_uiApplication->ActiveUIDocument->Selection->Elem ents::set(elemSet);
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.