Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Pick()
- {
- UIDocument uidoc = this.Application.ActiveUIDocument;
- UIApplication uiapp = Application; //UIApplicatio already defined as Application property
- Application app = Application.Application;
- Document doc = Document; //Document already defined as Document property
- StringBuilder sb = new StringBuilder();
- sb.Append(doc.PathName + "\n");
- TaskDialog.Show("Info",sb.ToString());
- Reference elemRef = uidoc.Selection.PickObject(ObjectType.Element);
- ElementId elemId = elemRef.ElementId;
- Element elem = doc.GetElement(elemId);
- TaskDialog.Show("info",elem.Name);
- }
Advertisement
Add Comment
Please, Sign In to add comment