Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use SurfaceCountourLabelGroup Class?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
ltmullen
441 Views, 4 Replies

How to use SurfaceCountourLabelGroup Class?

I'm a little confused about how to use the SurfaceContourLabelGroup class in the .NET API.

 

My first guess was that I had to create an instance object of the class and name it, and then use a "Create" method (e.g., CreateMultipleAtInterval) from there, like this:

 

Dim labelgroup As SurfaceContourLabelGroup

 

labelgroup.CreateMultipleAtInterval(arguments)

 

 

However, this doesn't work, as Visual Studio told me "Warning: Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated."

 

I tried just saying:

 

 

SurfaceContourLabelGroup.CreateMultipleAtInterval(arguments)

 

 

But that didn't seem to work either.

 

Can anyone help me understand how this class works and help me get it to add some contour labels to a drawing?

 

Thanks!

4 REPLIES 4
Message 2 of 5
Partha.Sarkar
in reply to: ltmullen

Hi,

 

Did you check this post ?

 

Creating Surface Spot Elevation Label using Civil 3D .NET API

 

Though it's on Surface Spot Elevation, but same approach should work for Surface Contour Label too.

 

Let me know if you need any further help here.

 

Thanks,

Partha Sarkar

Autodesk



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
ltmullen
in reply to: Partha.Sarkar

Cool, thanks, I'll try it out when I get the chance!

Message 4 of 5
Partha.Sarkar
in reply to: ltmullen

I just posted a C# .NET code snippet in a blog post in out IM DevBlog.

 

Check out this -

 

http://adndevblog.typepad.com/infrastructure/2013/11/creating-surface-contour-labels-using-civil-3d-...

 

Cheers,

Partha Sarkar

Autodesk



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 5 of 5
ltmullen
in reply to: Partha.Sarkar

Seems to work. I'm confused because I feel like I tried that way of using SurfaceContourLabelGroup.CreateMultipleAtInterval, but oh well. Thanks.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report