-
Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.
-
Control of pin text size in graphical cross-referencing - AutoCAD Electrical
November 20, 2007 01:50 PMby 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.
-
AutoCAD Electrical at Autodesk University
November 14, 2007 05:03 AMby Nate HoltHere is brief summary of the AutoCAD Electrical sessions at this year's Autodesk University (I hope I didn't miss any sessions... please contact me if I've overlooked !)
Rob Stein - Session ID: MA301-2
AutoCAD Electrical Power TOols for Power Users. Are you an AutoCAD Electrical power user looking for commands youre certain exist but cant seem to find? During this session, well discuss several of the lesser-known AutoCAD Electrical features including wiring information for panel drawings and using the power of Excel to update and manipulate your drawings. Well take a look at setting up Pin Lists to automatically assign pins to your components based on catalog information and, lastly, well discuss the Conduit feature in AutoCAD Electrical.
Jarred Osborne (this will be 20% ACE and 80% Inventor) - Session ID: MA111-4
Energizing Your Digital Prototype: Autodesk® Inventor Professional and AutoCAD® Electrical. This session will discuss digital prototyping and how the bidirectional communication between Autodesk Inventor Professional's Cable and Harness environment and AutoCAD Electrical can benefit anyone that designs electromechanical systems. Attendees will also be shown productivity tips and tricks for creating and authoring components in Inventor and AutoCAD Electrical.
Randy Brunette - Session ID: MA111-1L
A Quick Spin on AutoCAD Electrical. Take a hands-on test-drive of AutoCAD Electrical and get a feel for the powerful core features that make it one of the most popular electrical design packages on the market today. This class will appeal to anyone interested in learning the basics of AutoCAD Electrical -- we'll cover new features such as the Modernized Insert Component (MIC) menu, the enhanced Terminal Editing tool, and the new Wire Sequencing icons. You should have a basic understanding of AutoCAD to get the most from this class.
Randy Brunette - Session ID: MA115-4
Migrating from AutoCAD® to AutoCAD® Electrical. So youre not using an electrical drafting package but have created or are creating electrical drawings, and you're wondering how AutoCAD Electrical will work for you, right? Join us to see how AutoCAD Electrical can work with existing drawings and how to add electrical intelligence to those legacy files (such as intelligent ladders, electrical components, and automatic wire numbers). Well also highlight some of the major productivity gains available in AutoCAD Electrical compared with stand-alone AutoCAD. This class will appeal to anyone interested in learning the ins and outs of using AutoCAD Electrical in an AutoCAD environment. Attendees should have a basic understanding of AutoCAD.
Randy Brunette - Session ID: MA201-4
Secret Treasures of AutoCAD Electrical. AutoCAD Electrical has hundreds of utilities and time-saving tools, many of them tucked secretly away in fly-outs and drop-down menus just waiting to be discovered. From Layer tools to editing entire symbol libraries, from editing attributes to block editing, treasures await those who seek them. Come join our treasure hunt where a map and knowledgeable guide are provided to help avoid the quicksand along the way.
Randy Brunette - Session ID: MA211-4
AutoCAD® Electrical Customization: Special Operations, Mission 1. AutoCAD Electrical is extremely flexible and easy to configure to your companys specific needs. Take this class to learn more about creating custom blocks and catalog entries. Well cover 3-phase, Form-C contacts, Footprints, and other special Block types in detail. Youll explore the details of the core utilities, Symbol Builder, and Icon Menu Wizard, learning what makes them tick and how to make your own AutoCAD Electrical symbols and menus.
Nate Holt - Session ID: DE319-4
Introducing the AutoCAD Electrical API.
Nate Holt - Session ID: MA105-4
How AutoCAD Electrical Works.