[rvtApi]_010_FirstCommand in Revit
Get UIDocument
UIDocument uidoc = commandData.Application.ActiveUIDocument;
Get Element
Reference r = uidoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element);
try
{
if (r != null)
{
...
felixtran.hashnode.dev1 min read