I am Writing an app to find the position of the Revit links in the Project. I use the locationPoint but it gives null. T
FilteredElementCollector collector = new FilteredElementCollector(myDoc);//
collector.OfClass(typeof(Instance)).OfCategory(BuiltInCategory.OST_RvtLinks);
foreach (Element elLink in collector)
{
Instance ins = elLink as Instance;
RevitLinkType linkType = myDoc.GetElement(ins.GetTypeId()) as RevitLinkType;
LocationPoint pn = linkType.Location as LocationPoint;
TaskDialog.Show("rvt", "Name " + linkType.Name);
if (null != pn)
{
TaskDialog.Show("rvt", "location " + pn.Point.X + " " + pn.Point.Y + " " + pn.Point.Z);
}
}
I expect to find the x, y, z of the Revit linked file