I have an issue with area tag, modifing the LeaderEnd property always throws an exception telling me "Spatial point is outside the host element" also the point is the location point of the area.
I have tried same workflow in NewRoomTag && NewSpaceTag methods and they work fine.
I have tried to Regenerate the document or creating two transactions but same exception always throws at me.
If anyone knows this issue or a workaround please help.
Thanks in advance.
var elem =doc.GetElement( uidoc.Selection.PickObject(Autodesk.Revit.UI.Selection.ObjectType.Element)); var point = (elem.Location as LocationPoint).Point;
var tag = doc.Create.NewAreaTag(doc.ActiveView as ViewPlan,elem as Area,new UV(0,0));
tag.HasLeader = true;
tag.LeaderEnd =point;
var ep = point + 5 * XYZ.BasisY;
tag.TagHeadPosition= ep+5*XYZ.BasisX;
Can you achieve the desired modification manually in the user interface?
Have you analysed how that affects the Revit database, e.g., using RevitLookup?
Have you analysed whether the modifications are different from those generated by the cases that work as you expect?
Yes you can move the leaderEnd of the area tag in the UI.
I have searched online and I found a question about room tag however room tags and space tags works fine also I have looked into the RevitLookup to see values of Leader end property and below there are :
1-photo of an area tag created from revit ui and getting its leader points value.
2-External command to create an area tag in the same point.
3-External command to move an existing tag to the same point.
4-Exception that are always thrown.
Can't find what you're looking for? Ask the community or share your knowledge.