Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LeaderEnd Property in AreaTag gives me "Spatial point is outside the host element"

2 REPLIES 2
Reply
Message 1 of 3
abdelrahmanfathe95
510 Views, 2 Replies

LeaderEnd Property in AreaTag gives me "Spatial point is outside the host element"

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;

 

 

Tags (2)
Labels (1)
2 REPLIES 2
Message 2 of 3

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?

  

https://thebuildingcoder.typepad.com/blog/2017/01/virtues-of-reproduction-research-mep-settings-onto...

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

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.

area exception.jpgcomplete create command.jpgedit area tag.jpgrevit Lookup.jpg

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report