AutoCAD Civil 3D Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I need to extract the XY location of a surface label. Specifically, I am trying to determine the coordinates of the first picked point in a two-point slope label. But in looking at the IAeccSurfaceSlopeLabel interface in the ActiveX documentation, I'm not seeing where this data is stored. Even for a simple surface spot elevation label (IAeccSurfaceElevationLabel) I don't see a property that stores the coordinates.
Can anyone point me in the right direction here?
Thank you!
Brent McAnney
Solved! Go to Solution.
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
THe COM API does not give access to that info. However, with .NET you can get both Location and Location2 properties for the first & second points.
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks, Jeff! I have a fairly simple task, so I was hoping to complete this quickly via lisp. But I will take a stab at this tomorrow in .NET.
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Could you point me to the class representing the surface slope label? I'm not having any luck so far even finding the proper class to TryCast my selection set objects to.
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Well I just found this: http://docs.autodesk.com/CIV3D/2013/ENU/API_Refere
But I am working in Civil 3D 2011, and that class doesn't seem to exist (at least not in that location). Am I missing something, or is this only possible with newer versions of the API?
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Determine XY location of a surface label?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
You can also get the grip points of the object and use it to find where the label is at. I thought I had an example of it in a blog post, but it looks like I didn't create one. There's a post somewhere either in this group or .NET one where Tony Tanzillo mentioned it in response to one of my questions.
Christopher

