I would like to know, if it's possible to tag floors from linked file using Revit API 2015. It is possible through the Revit inreface. I'm using this method:
public IndependentTag NewTag(
View dbview,
Element elemToTag,
bool addLeader,
TagMode tagMode,
TagOrientation tagOrientation,
XYZ pnt
)
Solved! Go to Solution.
Solved by gopinath.taget. Go to Solution.
Hello,
Is this method not working? What is the error or exception you see?
Thanks
Gopinath
This is the error I see:
External component has thrown an exception.
StackTrace:
at getDefHeadPos(ADocument* , DBView* , Double* , Double* , HostOrLinkElementId* , ElementId , Double* , Boolean , TagPlacementOffsets* )
at Autodesk.Revit.Creation.Document.NewTag(View dbview, Element elemToTag, Boolean addLeader, TagMode tagMode, TagOrientation tagOrientation, XYZ pnt)
...
It works perfectly for floors in the host project, but not for floors in Linked file.
If this method is working for tagging floors from Linked file, then I'm not doing it the right way. It is a good idea to mention it in the Revit API Help and show some example.
best regards
Hello,
I have enquired with the revit engineering team about this. I will get back to you as soon as I hear something.
Thanks
Gopinath
Hello,
Unfortunately I do not have good news. right now, the API will not allow tagging if elements inside linked files. A change request has been logged for this. I will send you the details separately.
Cheers
Gopinath
Hi Gopinath,
I have the similar requirement to tag the pipe in linked document. could you tell me the status of this change? whether there are some workaround to tag the element in linked document?
Thanks,
Gavin
FYI, since Revit 2018 you should use the IndependentTag.Create method to create a tag in a Revit project (www.revitapidocs.com/2018.1/1f622654-786a-b8fd-1f81-278698bacd5b.htm). This method makes use of an element reference, and hence also works for elements from linked projects.