Scorpunduk

sample

Mar 12th, 2022
1,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. public void Pick()
  2.         {
  3.             UIDocument uidoc = this.Application.ActiveUIDocument;          
  4.             UIApplication uiapp = Application; //UIApplicatio already defined as Application property
  5.             Application app = Application.Application;
  6.             Document doc = Document; //Document already defined as Document property
  7.            
  8.             StringBuilder sb = new StringBuilder();
  9.             sb.Append(doc.PathName + "\n");
  10.             TaskDialog.Show("Info",sb.ToString());
  11.            
  12.             Reference elemRef = uidoc.Selection.PickObject(ObjectType.Element);
  13.             ElementId elemId = elemRef.ElementId;
  14.             Element elem = doc.GetElement(elemId);
  15.            
  16.             TaskDialog.Show("info",elem.Name);
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment