Goal: create a program to change all Label Style Text Styles to "Standard"
Why?: I am customizing a template and need to modify almost the entire list of styles settings for this value. I'm not interested in going manually through 100's of styles and finding all the culprits. Once this has been done the "non-standard" styles will be purged from the drawing.
Thoughts and assumptions: I'm limited in programming experience but have been going through the samples included with C3D 2015 at C:\Program Files\Autodesk\AutoCAD 2015\C3D\Sample\Civil 3D API\DotNet and ready to delve into programming as I've been putting it off for too long now. I imagine I will have to start with choosing one type of label style, such as Pipe Label Styles, and then include the rest of styles seperately. I will use this as a base for other programs streamlining some steps I currently run through.
Thanks for your feedback!
-Dustin
First, welcome to the forums!
You can spend days figuring out how to do this, or you could use a command already written by someone else and available here:
If you insist on the 'spending days' route, to write the one mentioned above I started with the sample code for comparing styles that is installed with C3D. Many changes were needed for the end result, but that should give a good idea of what you need to read all the styles.
I should note that there is a minor bug in the currently available download which was reported just yesterday. It has been fixed and a new installer will be posted soon. The bug affects MassHaulViews and SectionViews, an unhandled exception will occur if any of these styles are included in the list to change the Text Style(s) of.
If it's just label styles that you want to revise, you can do this globally. Right-click the drawing name in the Settings tab of the toolspace. Click Edit Label Style Defaults... Change the text style under Label. Remove any child overrides.