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

Change the font of the Installation code through out project

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
mewescott
1522 Views, 9 Replies

Change the font of the Installation code through out project

I have created a drawing set with thousands of installation codes that I need to add a TM symbol to.  The default font does not suppor the TM symbol.  I would like to change just the installation code font to Arial and not affect all the other attributes in the project.  Does anyone know of a project wide way to do this?  If not project wide is there a drawing wide way?  The Project wide Electrical style change changes all the fonts. I used the Find/Edit/Replace component text to insert the Unicode value for the TM symbol but the font shows it as "?".

9 REPLIES 9
Message 2 of 10
PatMurnen_Adsk
in reply to: mewescott

Text styles and fonts are not my area of expertise but I think you would have to create a new text style, assign the font you want to that style, then change the attributes to that text style.

 

There isn't a feature that will do this without some customization. You could use the Project-Wide Utilities to run a script project-wide. The script would call a custom list program to create the new text style with the font you want and then change all the INST attributes to that style.

 

I've attached a zip file containing a sample script and lsp file that is a starting place on this and should work with a few changes and setup. I did very minimal testing on this so try it out on some sample drawings and make backups of all drawings before running this on them.

 

You will need to use a text editor like Notepad and open the chg_inst_style.lsp file and change the style name and text font to what you want. My sample uses a style called "WD_Arial" and a text font "Arial". Just edit the file and save it with your text style and font name. The lsp file has comments in it so you should be able to tell what to change.

 

For this to work there is a little bit of setup so that the lsp file is loaded automatically anytime a drawing is opened. First unzip the files into a folder. Then in AutoCAD Electrical do these steps -

 

  1. type APPLOAD
  2. Click Contents in the Startup area.
  3. Click Add
  4. Browse to where you unzipped the lsp file and select it
  5. Close all dialogs.
  6. Restart AutoCAD Electrical

Then to try it follow these steps -

1. Run Project tab > Project Tools panel > Utilities

2. Check the box for "Run command script file"

3. Browse to where you unzipped the files and select the .scr file

4. OK

5. Select Project

6. Select the drawings to process

 

It should open each drawing, check for the text style and create it if it does not exist, look at each block on the drawing for an INST attribute, and change it to your text style.

 

 

 



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

Message 3 of 10
mewescott
in reply to: PatMurnen_Adsk

Thank you Pat but, I do not see the Zip file attached.

Message 4 of 10
PatMurnen_Adsk
in reply to: mewescott

Yes, I guess it would help if I actually attached it. Woman Embarassed

 

Here it is. Sorry about that.



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

Message 5 of 10
Justin2012
in reply to: PatMurnen_Adsk

Pat,

I will like a generic help on the architecture of that code. I have the same problem where I want to add an attributes through the entire project without going to each component and using the add attribute command. I think a code will help if there is no other way I can do? Please let me know.

 

Thanks.

Message 6 of 10
testsubject
in reply to: Justin2012

Depending on the number of components you want to do this on you could add the attribute to the component symbol in the library and then use Swap/Update Block selecting project wide to update.



Bob Hanrahan
Ace User since 1998
If this answered your question, please click on "Accept Solution"
Message 7 of 10

I agree with Bob that adding it to the library symbol and then updating using the Swap Block is the way to go. If it is a lot of blocks you can use the Library Swap option in the Swap Block. This would be pretty complicated I think to do using a lisp function.



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

Message 8 of 10
Justin2012
in reply to: PatMurnen_Adsk

Yes it is through the entire wiring diagram which include many blocks. I started using the add attribute command but as you know it takes forever. Please let me know?

Also, How do yo change the line reference for the entire project?

 

Thanks.

Message 9 of 10
PatMurnen_Adsk
in reply to: Justin2012

As I said I don't think adding attributes using a lisp function would be an easy thing to do. I still recommend adding the attributes to the library symbols themselves and then using the Swap Block to update the entire project in one command. The other advantage to this method is that any time you insert these blocks in the future they will have the added attributes. Adding them on  a block already inserted only adds it to that instance.

 

If you have anyone there who can write scripts it might be possible to write a script to insert the attribute definitions on the library symbols using the -ATTDEF command. If you are always inserting the same attribute definition, in the same location, with the same values. Once the script has been tested on one library symbol you could create a project containing the library symbol drawings and use the AcadE Project-wide Utilities to run the script across the project. Make a backup copy of the library symbols before doing this just in case you run into any problems.

 

Regarding line references, if you mean the ladder line references you can use the Renumber Ladder Reference command or the Project-wide Update/Retag.

 

By the way, I would recommend starting new posts when you ask new questions. You may get different people weighing in on the new question than the original one.



Pat Murnen
Principal Content Developer
Product Development – AutoCAD Product Line Group

Autodesk, Inc.

Message 10 of 10
Justin2012
in reply to: PatMurnen_Adsk

Oh ok, thanks.

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

Post to forums  

Autodesk Design & Make Report

”Boost