AutoCAD Civil 3D Customization

Reply
Distinguished Contributor
Posts: 406
Registered: ‎12-09-2003
Message 1 of 7 (178 Views)
Accepted Solution

Determine XY location of a surface label?

178 Views, 6 Replies
10-11-2012 01:59 PM

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

*Expert Elite*
Jeff_M
Posts: 3,959
Registered: ‎07-22-2003
Message 2 of 7 (174 Views)

Re: Determine XY location of a surface label?

10-11-2012 02:11 PM in reply to: BMcAnney

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.

Jeff_M, also a frequent Swamper
Distinguished Contributor
Posts: 406
Registered: ‎12-09-2003
Message 3 of 7 (171 Views)

Re: Determine XY location of a surface label?

10-11-2012 02:41 PM in reply to: Jeff_M

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.

Distinguished Contributor
Posts: 406
Registered: ‎12-09-2003
Message 4 of 7 (158 Views)

Re: Determine XY location of a surface label?

10-12-2012 09:04 AM in reply to: Jeff_M

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.

Distinguished Contributor
Posts: 406
Registered: ‎12-09-2003
Message 5 of 7 (151 Views)

Re: Determine XY location of a surface label?

10-12-2012 09:46 AM in reply to: BMcAnney

Well I just found this: http://docs.autodesk.com/CIV3D/2013/ENU/API_Reference_Guide/html/cb79636c-e90e-def7-7e03-005d9400d92...

 

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?

*Expert Elite*
Jeff_M
Posts: 3,959
Registered: ‎07-22-2003
Message 6 of 7 (147 Views)

Re: Determine XY location of a surface label?

10-12-2012 09:52 AM in reply to: BMcAnney

Here's a LINK to the help for this object. oops, guess you found it before I posted.

 

You will need a call to Import Autodesk.Civil.Land.DatabaseServices (2012) or Autodesk.Civil.DatabaseServices (2013)

 

For older versions, this wasn't yet added.

Jeff_M, also a frequent Swamper
Contributor
christopher
Posts: 23
Registered: ‎07-13-2011
Message 7 of 7 (135 Views)

Re: Determine XY location of a surface label?

10-13-2012 12:06 PM in reply to: BMcAnney

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

http://blog.civil3dreminders.com/

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs