- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey all,
I have a problem with linked files in a host Revit document.
Basically, I create a new document, link my clients document to mine and then do my stuff in my document only, not touching the original documents. Then I send my work to the clients and they just have to link it to their own documents.
Since I work on Rooms and they are hosted by Views and that Views are hosted by Levels, I need to re-create all the levels of the linked document in my own document.
This creates a transformation between my linked documents and my host document.
For example, my lowest level is -19.25 in my host document and 516.70 in my linked document.
But when I try to use GetTransform it returns my identity :
IList<Element> links = new FilteredElementCollector(uidoc.Document)
.OfCategory(BuiltInCategory.OST_RvtLinks)
.OfClass(typeof(RevitLinkInstance))
.ToElements();
foreach (Element instanceDoc in links)
{
collector = new FilteredElementCollector((instanceDoc as RevitLinkInstance).GetLinkDocument())
.OfClass(typeof(Level));
Transform t = (instanceDoc as RevitLinkInstance).GetTransform();
monMessage += "\r\n X " + t.BasisX
+ "\r\n Y " + t.BasisY
+ "\r\n Z " + t.BasisZ
+ "\r\n origine " + t.Origin
+ "\r\n échelle " + t.Scale;
}
Any idea where I am wrong ?
Thanks
Benoit
Solved! Go to Solution.
