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!
Solved! Go to Solution.
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
I just posted a C# .NET code snippet in a blog post in out IM DevBlog.
Check out this -
Cheers,
Partha Sarkar
Autodesk
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.