SolidWorks Express
CAD Tips for the week of December 14, 2009
 
Dynamic Blocks - Lookup parameter/action: The Lookup parameter, in combination with a Lookup action, allows you to create a table that assigns values to labels >>
Line Breaks in Table Cells: AutoCAD allows a table cell to hold multiple lines of text. Use the key combination Alt+Enter to add a line break to your table text >>
Angular Format: The DIMAUNIT system variable controls the units used when an angular dimension is displayed >>
Start With No New Drawing: Here’s another use for AutoCAD’s startup switches. If you want to start AutoCAD without creating a new drawing (Drawing1.dwg), right-click on your AutoCAD icon and select Properties >>
Immobilize InfoCenter: To speed up AutoCAD startup time, you can turn the InfoCenter off. InfoCenter can slow things down because at startup it tries to connect with Autodesk’s servers >>
Dynamic Blocks - Explode or Defuse: You can specify whether or not a Dynamic Block can be exploded in drawing. Open the block definition in the Block Editor and make sure nothing is selected >>
   
 
> Dynamic Blocks: Lookup parameter/action
   
 

The Lookup parameter, in combination with a Lookup action, allows you to create a table that assigns values to labels. This can come in handy when a block comes in preset sizes. The Lookup parameter and action are based on another parameter/action pair, such as a Linear parameter and Stretch action. In essence, the Lookup pair sets the allowable values for a particular parameter/action pair. You can either create a value set to preset the values that are used in the lookup table or set the values when you create the lookup table.

To use a Lookup parameter, open or create a block in the Block Editor and assign the parameter/action pair (for example, Linear parameter and Stretch action). If you want, create a value set for the parameter.

Next, add a Lookup parameter from the Parameters tab of the Block Authoring Palettes. Then add a Lookup action from the Action tab.


Caption: Dynamic block with Lookup parameter and action pair.

The Property Lookup Table dialog box displays. Select the Add Properties button, select the parameter you want to work with, and click on OK to return to the Property Lookup Table dialog box.

Click on the first row of the Input Properties window. If you already created a value set, select the pull-down arrow that appears and choose the first value. Otherwise, just type in your values in each row. On the Lookup Properties side of the window, enter the label you want to associate with each value.

Caption: Dynamic block lookup table.

Click on the lower right cell in the dialog box, which says Read-only by default. Select Allow Reverse Lookup.

Note: This will work only when all rows in the table are unique. It allows you to select a value from a pull-down list when you insert the block.

Click on OK, save the block, and close the Block Editor.

When you insert the block and select it to make its dynamic grips appear, one such grip will be a down arrow. Click the arrow to choose a label and its corresponding value from the list.


Caption: Select the Lookup grip (down arrow) to select a value from your lookup table.

   
 
> Line Breaks in Table Cells
   
 

AutoCAD allows a table cell to hold multiple lines of text. Use the key combination Alt+Enter to add a line break to your table text. AutoCAD will also automatically break text when it becomes too long to fit on a single line in a cell.

   
 
> Angular Format
   
 

The DIMAUNIT system variable controls the units used when an angular dimension is displayed. Changing the variable is a quick way to update a drawing to the units you want. The options are as follows:

0 = Decimal degrees

1 = Degrees/minutes/seconds

2 = Grads

3 = Radians

4 = Surveyor’s units

   
 
> Start With No New Drawing
   
 

Here’s another use for AutoCAD’s startup switches. If you want to start AutoCAD without creating a new drawing (Drawing1.dwg), right-click on your AutoCAD icon and select Properties. Add the following switch to the string in the Target window:

/b close

The Target window will look something like this now:

"C:\Program Files\AutoCAD 2007\acad.exe" /b close

The /b startup switch runs a script. You now want to create a text file called CLOSE.SCR and save it somewhere in AutoCAD’s search path. The script file should contain the following text:

_CLOSE

Be sure to include an Enter after the CLOSE. This script file will close Drawing1.dwg immediately.

An alternative to the script file (perhaps you’re already using the /b switch to call another script file) is to use the system variable startup. When STARTUP is set to 0, AutoCAD will display the Select Template dialog box or open the default drawing template file specified in the Files tab of the Options dialog box. When STARTUP is set to 1, AutoCAD displays the Startup and the Create New Drawing dialog boxes.

   
 
> Immobilize InfoCenter
   
 

To speed up AutoCAD startup time, you can turn the InfoCenter off. InfoCenter can slow things down because at startup it tries to connect with Autodesk’s servers. To turn it off, you will need to edit the Windows registry. Select Run from the Windows Start menu, then type Regedit in the box that appears. In the Registry Editor, search for this key:

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\InfoCenter

Note that previous versions of AutoCAD (and AutoCAD LT) will have slightly different keys.

This key contains a value with the name “InfoCenterOn.” Change its value from 1 to 0 to disable the InfoCenter toolbar.

You can also use the following Visual LISP string if you want to avoid messing with the registry.

(vl-registry-write
 
(strcat "HKEY_LOCAL_MACHINE\\"
(vlax-product-key)
"\\Applications\\InfoCenterAcConn"
)
"LOADCTRLS"
0
)
   
 
> Dynamic Blocks: Explode or Defuse
   
 

You can specify whether or not a Dynamic Block can be exploded in drawing. Open the block definition in the Block Editor and make sure nothing is selected. In the Properties palette, under Block, click Allow Exploding, and on the drop-down list, select Yes or No.


Caption: Explode settings are found under Block in the Properties palette.

On the Block Editor toolbar, click Save Block Definition.

   
 
   
 
 
>> SIGN UP for SolidWorks Express Newsletter and get the tips and tricks delivered into your inbox every two weeks!