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: 

Mass Change of Text Style with .Net?

2 REPLIES 2
Reply
Message 1 of 3
dustinmanning
444 Views, 2 Replies

Mass Change of Text Style with .Net?

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.

 

screenshot

 

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

 

 

Tags (2)
2 REPLIES 2
Message 2 of 3
Jeff_M
in reply to: dustinmanning

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:

CivilStyleProperties 

 

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.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 3
drewbb
in reply to: dustinmanning

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.

Sincerely,
Drew Burgasser, P.E.
CAD Masters, Inc.
www.cadmasters.com

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report