- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to automate the creation of general segment labels for linetypes through the .Net Api. I have had success working with polylines, lines and alignment but am struggling when working with featurelines.
The specific issue is that I am unable to place a label on a closed featureline. The error occurs when I try to set the label.Ratio to a given parameter and reads "The ratio should be in the range [0, 0]." This occurs no matter what the actual parameter value I pass in is. I am noticing when running this code on open feature lines I am getting a featureline.StartParam of 0 and a featureline.EndParam of however many segments the line has, say 5. When working with a closed featureline I am seeing that the featureline.StartParam is 0 and the featureline.EndParam would be 5 for this example, but when calling featureline.GetParameterAtPoint(featureline.EndPoint) I am seeing the value returned as 0 which struck me as odd.
I have thought about trying to add a point a very small distance from the actual end point and breaking the featureline to allow it to run properly and then returning it to it's original closed state but that feels like it will introduce it's own issues and inaccuracies. Any insight or advice would be greatly appreciated, thank you!
Solved! Go to Solution.