AutoCAD Electrical General Discussion

AutoCAD Electrical General Discussion

Reply
Contributor
mewescott
Posts: 21
Registered: ‎02-10-2011
Message 1 of 10 (909 Views)
Accepted Solution

Change the font of the Installation code through out project

909 Views, 9 Replies
09-24-2012 08:34 PM

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 "?".

Yes, I guess it would help if I actually attached it. :womanembarrassed:

 

Here it is. Sorry about that.

Employee
murnenp
Posts: 660
Registered: ‎08-01-2007
Message 2 of 10 (888 Views)

Re: Change the font of the Installation code through out project

09-25-2012 08:09 AM 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
Information Modeling and Platform Products Group

Autodesk, Inc.

Contributor
mewescott
Posts: 21
Registered: ‎02-10-2011
Message 3 of 10 (884 Views)

Re: Change the font of the Installation code through out project

09-25-2012 08:25 AM in reply to: murnenp

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

Employee
murnenp
Posts: 660
Registered: ‎08-01-2007
Message 4 of 10 (879 Views)

Re: Change the font of the Installation code through out project

09-25-2012 08:47 AM in reply to: mewescott

Yes, I guess it would help if I actually attached it. :womanembarrassed:

 

Here it is. Sorry about that.



Pat Murnen
Principal Content Developer
Information Modeling and Platform Products Group

Autodesk, Inc.

Distinguished Contributor
Justin2012
Posts: 221
Registered: ‎01-25-2012
Message 5 of 10 (745 Views)

Re: Change the font of the Installation code through out project

10-18-2012 05:46 AM in reply to: murnenp

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.

*Expert Elite*
testsubject
Posts: 1,103
Registered: ‎03-09-2004
Message 6 of 10 (742 Views)

Re: Change the font of the Installation code through out project

10-18-2012 06:33 AM 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
Employee
murnenp
Posts: 660
Registered: ‎08-01-2007
Message 7 of 10 (739 Views)

Re: Change the font of the Installation code through out project

10-18-2012 06:43 AM in reply to: testsubject

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
Information Modeling and Platform Products Group

Autodesk, Inc.

Distinguished Contributor
Justin2012
Posts: 221
Registered: ‎01-25-2012
Message 8 of 10 (717 Views)

Re: Change the font of the Installation code through out project

10-19-2012 05:17 AM in reply to: murnenp

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.

Employee
murnenp
Posts: 660
Registered: ‎08-01-2007
Message 9 of 10 (714 Views)

Re: Change the font of the Installation code through out project

10-19-2012 05:31 AM 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
Information Modeling and Platform Products Group

Autodesk, Inc.

Distinguished Contributor
Justin2012
Posts: 221
Registered: ‎01-25-2012
Message 10 of 10 (707 Views)

Re: Change the font of the Installation code through out project

10-19-2012 08:15 AM in reply to: murnenp

Oh ok, thanks.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions to get help installing your software.

New AutoCAD Electrical Category!

The AutoCAD Electrical forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.

Announcements
Manufacturing Community
The Manufacturing Community provides additional access to tips, tutorials, blogs and networking with peers.