Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

get link element revit api

  UIApplication uiapp = commandData.Application;
            UIDocument uidoc = uiapp.ActiveUIDocument;
            Application app = uiapp.Application;
            Document doc = uidoc.Document;
			ObjectType obt=ObjectType.LinkedElement;
			Reference refElemLinked;
			Element linkedelement = null;
			
			refElemLinked = uidoc.Selection.PickObject(obt, "Please pick an element in the linked model");
                        RevitLinkInstance elem = doc.GetElement(refElemLinked.ElementId) as RevitLinkInstance;
                        Document docLinked = elem.GetLinkDocument();
						
						linkedelement = docLinked.GetElement(refElemLinked.LinkedElementId);
Source by forums.autodesk.com #
 
PREVIOUS NEXT
Tagged: #link #element #revit #api
ADD COMMENT
Topic
Name
8+5 =