Answers for "get link element revit api"

C#
0

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);
Posted by: Guest on August-12-2021

C# Answers by Framework

Browse Popular Code Answers by Language