.NET

.NET

Reply
*Expert Elite*
GTVic
Posts: 907
Registered: ‎09-07-2004
Message 1 of 4 (128 Views)
Accepted Solution

How to Assign a Point Style or Point Label Style back to <default>

128 Views, 3 Replies
07-03-2014 05:02 PM

This is in the Civil 3D COM interface but I thought I'd ask here:

 

If the description key point style is set to "<default>"

(AeccPointDescriptionKey.PointStyle Is Nothing) = True

 

If it is not Nothing and you want to set the style back to "<default>" then this will give an error.

 

AeccPointDescriptionKey.PointStyle = Nothing

 

Wondering what the correct procedure is for this.

Same question for PointLabelStyle

 

Thanks.

*Expert Elite*
GTVic
Posts: 907
Registered: ‎09-07-2004
Message 2 of 4 (123 Views)

Re: How to Assign a Point Style or Point Label Style back to <default>

07-03-2014 05:30 PM in reply to: GTVic

This is similar to this question which was never answered:

http://forums.autodesk.com/t5/AutoCAD-Civil-3D-Customization/Set-point-group-label-style-to-quot-non...

 

These are two of the options I've tried:

oPntDesKey.PointStyle = VariantType.Null

oPntDesKey.PointStyle = Nothing

*Expert Elite*
Jeff_M
Posts: 4,291
Registered: ‎07-22-2003
Message 3 of 4 (92 Views)

Re: How to Assign a Point Style or Point Label Style back to <default>

07-04-2014 09:42 AM in reply to: GTVic
I'm guessing that you are using COM due to either working with a pre-2013 version or needing an external application. For this, I have never found a solution. However, if you are working in 2013+ and it's for use inside C3D, have you considered moving to the .NET API? With that you can set the the PointStyleId=ObjectId.Null
Jeff_M, also a frequent Swamper
*Expert Elite*
GTVic
Posts: 907
Registered: ‎09-07-2004
Message 4 of 4 (88 Views)

Re: How to Assign a Point Style or Point Label Style back to <default>

07-04-2014 11:18 AM in reply to: Jeff_M

For this I'm compiling for 2013+, I previously compiled for 2011+, but when I started this code I don't think there was a .NET interface for Point Description Key Sets which I see now.

 

No such luck for the figure prefix database as far as I can see. Writing / debugging with "As Object" is annoying so that will be a bonus.

 

Thanks Jeff.

 

Interop:

Autodesk.AECC.Interop.UiLand.IAeccDocument.PointDescriptionKeySets

.NET:

Autodesk.Civil.DatabaseServices.PointDescriptionKeySet

Autodesk.Civil.DatabaseServices.PointDescriptionKeySetCollection

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.