adt custom menu1 - augi

14
c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 1 9/23/2002 8:59 AM Las Vegas, Nevada December 3-6, 2002 Speaker Name: Bob Callori Course: Working with Custom menus in ADT Course Description Want to customize ADT so that the Design Center symbol library content appears in toolbar format? Discussions include methods for creating custom toolbars using ADT design content or your own custom symbols and how to display toolbars from a pulldown menu. The instructor will cover basic toolbar customization issues including how to switch between the CSI Master and AutoDesk Architectural Desktop format pulldown menus. Bob Callori, AIA IA – Interior Architects, Inc Email: [email protected] Voice: 415-821-7988

Upload: others

Post on 19-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 1 9/23/2002 8:59 AM

Las Vegas, Nevada December 3-6, 2002

Speaker Name: Bob Callori

Course: Working with Custom menus in ADT

Course Description Want to customize ADT so that the Design Center symbol library content appears in toolbar format? Discussions include methods for creating custom toolbars using ADT design content or your own custom symbols and how to display toolbars from a pulldown menu. The instructor will cover basic toolbar customization issues including how to switch between the CSI Master and AutoDesk Architectural Desktop format pulldown menus.

Bob Callori, AIA IA – Interior Architects, Inc Email: [email protected] Voice: 415-821-7988

Page 2: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 2 9/23/2002 8:59 AM

COURSE OBJECTIVES 1. Duplicate the Design Content – Imperial Toolbar to open Design Center symbol

folders

2. Create toolbar that would open subfolders, such as Dishwasher, in Design Center

3. Create toolbar flyouts with icon buttons for each ADT symbol to place ADT symbols

into drawings (instead of drag and drop from Design Center) • ...Place ADT symbols on specified layer • ...Display user friendly prompts at command line • ...Include appropriate object snap mode during symbol

insertion • ...Set orthomode on if appropriate • ...Open attribute dialog if appropriate • ...Easily edit symbol’s path or location

4. Create custom toolbar to place symbols into drawings

• Place an ADT, CSI folder or Office Standard symbol on specified layer • Display user friendly prompts at command line • Include appropriate object snap mode during symbol insertion • Set orthomode on if appropriate • Open attribute dialog if appropriate • Easily edit symbol’s path or location

Page 3: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 3 9/23/2002 8:59 AM

STARTING YOUR AUTOCAD SESSION

Click on the ADT for AU Library shortcut on your disk. This will automatically add the custom library folders and paths to your AutoCAD session.

The following is furnished For Your Information only - 1. You can save your current settings to an .ARG file name and recall these settings by clicking on the

desktop shortcut. 2. Open the Options dialog and click the Export

button. The .ARG file can be saved on a network drive.

3. The Target edit box contains the following: "C:\Program Files\Autodesk Architectural Desktop 3\acad.exe" /t "c:\Program Files\Autodesk Architectural Desktop 3\Template\Aec Arch (Imperial - Intl).dwt" /p "C:\Library\library.arg"

Code Comment "C:\Program Files\Autodesk Architectural Desktop 3\acad.exe"

Acad.exe starts the ADT program

/t "c:\Program Files\Autodesk Architectural Desktop 3\Template\Aec Arch (Imperial - Intl).dwt"

Refers to the template file that appears when the ADT session first opens

/p "C:\Library\library.arg" Library.arg save all the settings: Search paths, menus, template file, etc.

Page 4: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 4 9/23/2002 8:59 AM

MENUS AND FOLDERS \Program Files\ADT Content folder – AecArchX.mns

Custom library located in the \Library\CSI Content folder – Adt.menu

• The Appliances… ADT

menu command expands the Design folder in DesignCenter.

• This toolbar also expands the

main Design folders in DesignCenter.

• Picking the Appliances icon

displays the Appliances folder

Note: Pick each main folder to expand the main folder.

• The CSI format of the

Design folders • A custom office standard

Symbols folder

Page 5: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 5 9/23/2002 8:59 AM

Appliances (D1) command displays DC-Appliances toolbar

Opens the ADT Design Center and displays the Dishwasher subfolder under Appliances

Opens the ADT Design Center and displays the Kitchen Unit subfolder under Appliances

Opens the ADT Design Center and displays the Misc subfolder under Appliances

Appliances (T1) command displays Appliances toolbar which opens flyouts with icons of individual symbols:

• Dishwasher flyout • Kitchen unit flyout • Misc flyout • Range flyout • Refrigerator flyout

First flyout (shown below)

1 2 3

1 Inserts Standard dishwasher

2 Inserts Convertible dishwasher

3 Inserts Undercounter dishwasher

Page 6: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 6 9/23/2002 8:59 AM

Standard ADT Menus

1. The Design Content – Imperial toolbar is part of the AecArchx menu.

2. Design Content – Imperial toolbar is shown below. Pick the Appliances icon.

3. The Appliances icon opens the Appliances

folder in the Architectural Desktop library

Standard ADT Menu with custom menus

This is a toolbar/icon version of the ADT Design Content Library that places ADT symbols into your

drawing based on your current dimscale with user friendly prompts.

ADT Library (ADT.mns) Custom Library (Custom.mns)

Acad.mns Accovl.mns Express.mns

AecArchx.mns Acad.mns

Page 7: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 7 9/23/2002 8:59 AM

SETTING SEARCH PATHS

Save symbol search paths in Options dialog:

FILES Tab – Autodesk Architectural Desktop Content

• \Program Files\Autodesk Architectural Desktop 3\Support • \Program Files\Autodesk Architectural Desktop 3\Fonts • \Program Files\Autodesk Architectural Desktop 3\Help • \Program Files\Autodesk Architectural Desktop 3\Content\Layers • \Program Files\Autodesk Architectural Desktop 3\Express

Custom Library

• \Library\Support • \Library\Bmp

AEC CONTENT Tab

Page 8: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 8 9/23/2002 8:59 AM

CREATING AN ACADDOC.LSP FILE

1. Create an Acaddoc.lsp file to: • Define search paths for your custom symbols and for the ADT symbols located in the

\Library\Content folders. • Define your custom routines or commands for icon buttons.

2. Save the Acaddoc.lsp file in the \Library\Support folder.

The acaddoc file is a custom file that can be created by an end user. It allows you to store/set system variables, autocad paths and autolisp programming code.

3. Using a “setq” function, you can assign

any name or group of letters to represent the entire path and place minimal code in the “Macro associated with this button” section of the Customize dialog as shown below:

Setq Represents an Autolisp function @sym Alias name to represent full path C:/Library/symbols/ Actual full path

(setq @sym "C:/Library/symbols/") | | | | | | - Full path | | - @sym can be used in toolbar code to represent the full path. (The @ sign is

used just to make the alias name unique). | - this is an autolisp function used to “set quote” (the path) in memory. You can use

one forward slash(/) in the acaddoc.lsp file or two backward slashes (\\) between each folder name.

4. The Acaddoc.lsp file can be used to define the location of your symbols:

• C:\Library\symbols is where your office standard symbols can be stored • C:\Program Files\Autodesk Architectural Desktop 3\Content\Imperial\Design… folders is where

you can retrieve the Autodesk architectural desktop symbols • C:\Library\Content\Imperial\Design… folders is where I have placed the CSI directory structure

folders which contain duplicate symbols as in the Autodesk architectural desktop symbols (for this demonstration).

Page 9: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 9 9/23/2002 8:59 AM

5. Routines can be defined in the Acaddoc.lsp file. INSBLK is the name of the routine for this training

session . Notice that the variable for Osnap is assigned the letters OSM in the acaddoc.lsp file, but in the toolbar code it will appear as “nea”.

;(start)----------------------AUTOLISP PROGRAM FOR TOOLBARS---------------(start) ;;Toolbar code: ^C^C(insblk5 (strcat @sym "duplex-e") "a-power-e" "14" "nea" pause "1" "1" "0" "Pick to place existing

duplex outlet, then pick to orient." nil) ;;Code analysis: ({routine name} {path + block name} {layer name} {layer color} {osnap} {user allowed to pick angle} {unique prompt}) (defun insblk (BLK LAY COL OSM ROT ORTH ATTD ATTR PMT / pt1) ;This section saves current variables (SETQ OLDCMDECHO (GETVAR "CMDECHO")) (SETQ OLDLAYER (GETVAR "CLAYER")) (SETQ OLDORTHOMODE (GETVAR "ORTHOMODE")) (SETQ OLDATTMODE (GETVAR "ATTMODE")) (SETQ OLDATTREQ (GETVAR "ATTREQ")) (SETQ OLDATTDIA (GETVAR "ATTDIA")) ;Sets system variables (SETVAR "CMDECHO" 0) (SETVAR "ATTMODE" 1) ;Assign variables to commands - (command "OSNAP" OSM) ;Set specific object snaps (command "LAYER" "M" LAY "c" COL LAY "") ;Make Layer/layer color (command "ORTHOMODE" ORTH) ;Set Ortho mode on/off (command "ATTDIA" ATTD) ;Set attribute dialog display on/off (command "ATTREQ" ATTR) ;Set attribute dialog prompt request on/off ;Display unique command prompt for each icon (princ (strcat "\n" PMT)) ;Display this prompt when user picks point to insert symbol (SETQ pt1 (GETPOINT "\nPick point for symbol...")) ;Insert object based on current dimscale value with variable for rotation of object (COMMAND "INSERT" BLK pt1 (getvar "dimscale") (getvar "dimscale") ROT) ;;;Rotates attribute horizontally upon insertion (defun dxf (code elist) (cdr (assoc code elist)) ) (setq entname (dxf -1 (entget (entlast)))) (while (and entname (/= (dxf 0 (setq entdata (entget entname))) "SEQEND")) (cond ((and (dxf 2 entdata) (= (dxf 0 entdata) "ATTRIB")) (entmod (list (cons -1 entname) (cons 50 0))) )) (setq entname (entnext entname)) ) (entupd (entlast)) ;This section restores original variable values (SETVAR "CLAYER" OLDLAYER) (SETVAR "CMDECHO" OLDCMDECHO) (SETVAR "ORTHOMODE" OLDORTHOMODE) (SETVAR "ATTMODE" OLDATTMODE) (SETVAR "ATTREQ" OLDATTREQ) (SETVAR "ATTDIA" OLDATTDIA) (PRINC) ) ;(end)----------------------AUTOLISP PROGRAM FOR TOOLBARS---------------(end)

Page 10: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 10 9/23/2002 8:59 AM

6. Toolbar code shows the Macro associated with the Duplex Outlet symbol. The bulleted items below

identify settings for “variables” that have been identifed in the acaddoc.lsp file.

• ....Name of command that runs the routine – insblk • ....Path and block name [BLK] – (strcat @sym “duplex”) • ....Layer name [LAY] – a-power • ....Layer color assignment [COL] – 3 • ....Osnap(s) appropriate to block name [OSM] – nea • ....Rotation of block [ROT] – pause or “0” • ....Orthomode [ORTH] – 1 (on) • ....Display Attribute dialog (Attdia) [ATTD]– 0 (off) • ....Prompt for Attribute dialog (Attreq) [ATTR] – 0 (off) • ....Prompt specific to block being inserted into drawing [PMT] – Pick to place duplex outlet, then

pick to orient. 7. To open the Customize dialog

• ....Tools > Customize > Toolbars or Right-click icon, then pick Customize • ....Right-click the icon button, then pick Properties

Page 11: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 11 9/23/2002 8:59 AM

LOADING THE CUSTOM MENU

The following is furnished For Your Information only - 1. Use the Menuload command to add additional menus to the current menus loaded. 2. Enter the MENULOAD command to open the Menu

Customization dialog box and click on the Menu Groups tab.

3. Pick BROWSE… 4. Locate the CUSTOM.MNS file in the

C:\Library\Support folder, then click OPEN.

• Once the file is selected, the menu name, ex. custom.mns appears in the File Name edit box in the Menu Customization dialog.

5. Click LOAD and the custom.mns file will display

the MENUGROUP name (identified at the top of the custom.mns file) in the Menu Groups list box.

***MENUGROUP=Custom

Page 12: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 12 9/23/2002 8:59 AM

6. The MENUGROUP name shown in the Menu Groups

list box. 7. Click the Menu Bar tab.

• Highlight Custom in the Menu Group list box at the left.

• The Custom Library menu will appear in the Menus List box.

8. Highlight Concept in the Menu Bar list box at the right. • Click the INSERT>> button to place the Custom

Library menu in the menu bar before the Concept menu.

9. Pick CLOSE to exit the dialog.

Page 13: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 13 9/23/2002 8:59 AM

EXERCISES

We will use this Sample Symbols toolbar to demonstrate how to edit Macro values and customize each icon button.

Changing Description and Command line prompt

• Existing

• New

Existing Description: New Description: Round table with chairs: Uses architects in-house Library symbol folder

Rectangular table with chairs: Uses architects in-house Library symbol folder

Existing Macro (prompt): New Macro (prompt): ^C^C(insblk (strcat @sym "conf8") "a-furn" "2" "nea" "0" "1" "0" "0" "Pick to place round table with 4 chairs.")

^C^C(insblk (strcat @sym "conf8") "a-furn" "2" "nea" "0" "1" "0" "0" "Pick to place rectangular table with 4 chairs.")

Changing Orthomode

• Existing

• New

Existing Macro (orthomode=on): New Macro (orthomode=off): ^C^C(insblk (strcat @sym "chair") "a-furn" "2" "nea" pause "1" "0" "0" "Pick to place chair, then pick to orient.")

^C^C(insblk (strcat @sym "chair") "a-furn" "2" "nea" pause "0" "0" "0" "Pick to place chair, then pick to orient.")

Page 14: ADT custom menu1 - AUGI

c:\documents and settings\t_wurcj\local settings\temporary internet files\olk2\adt custom menu1.doc 14 9/23/2002 8:59 AM

Changing display/suppression of attribute dialog box • Existing

• New

Existing Macro (attribute dialog suppressed): New Macro (attribute dialog opens): ^C^C(insblk (strcat @sym "duplex") "a-power" "3" "nea" pause "1" "1" "0" "Pick to place duplex outlet, then pick to orient.")

^C^C(insblk (strcat @sym "duplex") "a-power" "3" "nea" pause "1" "1" "1" "Pick to place duplex outlet, then pick to orient.")

Changing symbol path from ADT to Library\Content folder

• Existing

• New

Existing Macro (symbol path):

New Macro (symbol path):

(setq @15400 "C:/Library/Content/Imperial/Design/Div15 - Mechanical/15400 - Plumbing Fixtures/Drains/")

(setq @drain "C:/Program Files/Autodesk Architectural Desktop 3/Content/Imperial/Design/Plumbing/Drains/")

^C^C(insblk (strcat @15400 "roof drain") "A-Flor-Pfix" "140" "" "0" "1" "1" "0" "Pick point to place roof drain. ")

^C^C(insblk (strcat @drain "roof drain") "A-Flor-Pfix" "140" "" "0" "1" "1" "0" "Pick point to place roof drain. ")