-
Controlling the Machine is no longer being updated. Don't worry, though, you can still follow Nate Holt at his new blog, AutoCAD Electrical Etcetera. You'll find it at http://nateholt.wordpress.com. Or you can subscribe to his feed to get latest words of wisdom automatically: http://nateholt.wordpress.com/feed/. You also can continue to view the Controlling Machine archives for Nate's AutoCAD Electrical tips and tricks.
-
Control of pin text size in graphical cross-referencing - AutoCAD Electrical
November 20, 2007, 01:50 PM Nate HoltOne of the cross-referencing modes that you can flip AutoCAD Electrical into is one that inserts the cross referencing as an Mtext entity. This includes some special fonted characters to represent N.O. and N.C. contacts.
Part of this Mtext cross-reference is the "pin" number assignment on each side of the cross-reference graphic. AutoCAD Electrical defaults to the "monotxt.shx" font for these pin numbers and also forces the pin number text height to be 2/3rds of the default cross-reference text height. The monotxt font provides equal spacing for each character and tends to keep things lined up better than with a non uniform-width font.
But, there are times where your customer may demand that this pin text be a different size or different font. What to do??
Solution - preparation
Both the pin text font and pin text height ratio are controlled by values held in memory during the AutoCAD Electrical session. The default values are "monotxt.shx" and "0.67" respectively (both are character string values). You can temporarily assign a new value to either one and then view the results.
With the project active and the above drawing displayed on the screen, let's type this at the command line prompt:
Command: (setq GBL_wd_xref_mtext_pinsize "0.5") [Enter]
Rerun the cross-reference command on this active drawing. What you should now get is this:

Notice that the pin text looks to be about half the size of the rest of the cross-reference text.
Try this... let's change the text size ratio to 1.0 and also change the pin font to "bold.shx". Type these two lines at the command line:
Command: (setq GBL_wd_xref_mtext_pinsize "1.0") [Enter]
Command: (setq GBL_wd_xref_mtext_pinfont "bold.shx") [Enter]
Now re-run the cross-reference update. Here's what you should now get:

Experiment this way until you get the results you are hoping for. Then...
Solution - Implementation
Let's say that you like the pin text height to be the same as the rest of the cross-reference text and you want to use the "bold.shx" font for the pin numbers. It would be nice to avoid having to type this in at the command before running the cross-referencing update command. Here's one way to have these values automatically loaded when you start AutoCAD Electrical.
The "wd.env" environment file solution - ACE2008 and later
You can encode these variable settings in the wd.env environment file. This is a plain ASCII text file that holds a number of defaults used by the application.
The full file name for the environment file is use can be displayed by typing this at your AutoCAD Electrical command line prompt:
Command: !GBL_wd_using_wd_env_full_fnam [Enter]
1. Exit AutoCAD Electrical. Make backup copy of this wd.env file (just in case!)
2. Open with a plain ASCII text editor (ex: Wordpad or Notepad).
3. Scroll down to the end of the file. Add the two lines shown in bold below (make sure no leading asterisk character). Save and exit the file.
************************************************************************************
* Misc
************************************************************************************
*WD_SUP_ALT,x:/some path/,to include an alternate support path (searched before normal AutoCAD Electrical support path)
*WD_ACADPATHFIRST,1,if 1 then check ACAD path first before AutoCAD Electrical paths
*WD_SCR_DLG,x:/some path/,to override starting path for SCRIPT file selection dialog
WD_MSG,ENU (English-US),map internal prompts and messages to specific language column in wd_msg.mdb file
*WD_LASTSURF,%DS_DIR%/user/lastsurf.tmp,extern text file listing last surfed item
*WD_PRINT_FONT,"Courier New" 10, Dialog's PRINT report font name and optional point size.
*SETQ:GBL_wd_qsok,1,Project database freshen operations: 1=suppress prompt for QSAVE
*SETQ:GBL_wd_backup_prompt,1,ZIP backup prompt before project-wide operations: 1=prompt for backup
*SETQ:GBL_wd_green_x_at_connection,0,Insert wire - dynamic green x's at connections: 0=suppress
SETQ:GBL_wd_xref_mtext_pinfont,"bold.shx",graphical cross-references - font for the "terminal pin" text
SETQ:GBL_wd_xref_mtext_pinsize,"1.0",pin/cross-reference text height ratio
*SETQ:GBL_wd_wnum_noduplicate_chk,'("GND" "24VDC" "COM")
*SETQ:GBL_wd_colga_leaderlay,"SYMS"
*SETQ:GBL_wd_colga_textlay,"MISC"4. Restart AutoCAD Electrical and test.
The ACAD200xDOC.lsp solution - for any version of AutoCAD Electrical
This is the alternate version and must be used for ACE2007 (and prior).
1. Locate the acad2007doc.lsp file. It should be in your "c:\program files\autodesk\acade 2007\support\" folder. Make backup copy.
2. Open with text editor. Scroll down to the end of the file.
3. Add in the lines shown in bold:
(princ "loaded.")
(setq GBL_wd_xref_mtext_pinsize "1.0")
(setq GBL_wd_xref_mtext_pinfont "bold.shx")
;; Silent load.
(princ)4. Restart AutoCAD Electrical and test.
You must be logged in to post a comment.