AUGIWorld Magazine - November/December 2008 - (Page 26) hatch patterns and dimensions, and create tools that execute commands among other types of tools. Figure 1: Tool Palettes window DesignCenter can also be used to insert your custom blocks, along with other named objects such as layers and linetypes. Along with customizing blocks, drawing templates, and tool palettes, you can also create user profiles from the Options dialog box, which allows you to configure multiple computers with the same settings (support paths, drafting, and modeling settings), use command line switches to control the behavior of AutoCAD at startup (specify the default template, profile, or workspace), and define command aliases which allow you to enter a few characters at the command prompt to start a command instead of the command’s full name. they are entered at the command prompt to create an action macro. Once an action macro is recorded, you can add some elements to it to allow for entering new values during playback as well as displaying user messages that explain what the action macro might do, among others. Script files are similar to action macros except you have to understand how to format commands and option values in a text file, which AutoCAD does for you when using the Action Recorder. However, it is easier to use other forms of customization with script files when compared to action macros. With script files, you can use AutoLISP and VBA macros and you can create scripts to batch process drawings. Menu customization is done with the Customize User Interface (CUI) Editor (see Figure 3). This allows you to create and organize user interface elements such as ribbon panels and toolbars. You can use menu customization to create custom commands for the user interface. These commands define macros, which determine the commands, command options, and any user input required to complete the commands specified. simple geometry such as circles or boxes to a linetype as well as text. Custom hatch patterns are just like they sound, they are definitions used to fill enclosed areas with linework. Top floor: custom commands and programming Next stop: hardware and utilities Beyond the basics of AutoCAD customization lies the next great frontier. The Action Recorder (see Figure 2) allows you to record commands and option values as Figure 3: Customize User Interface (CUI) editor Figure 2: Action Recorder One might not consider custom linetypes, shapes, and hatch patterns to be items you would customize in AutoCAD, but it is possible. If you are in civil engineering or piping, you might have thought on one or more occasions that it would be nice to use a different linetype to represent a part of a design. With custom linetypes, you can do just that. Shapes are objects used in combination with linetypes to add Ah, the crème de le crème of AutoCAD customization—being able to create your own custom commands is where the real power of customizing AutoCAD lies. This is where you really take control and determine how things should be done: from which layers to create to how objects should be drawn. Visual LISP and AutoLISP allow you to create custom commands that are based on standard AutoCAD commands and a library of functions that allow you to do things such as getting input from the user and building logical conditional statements which determine how the command should act. Visual LISP and AutoLISP can be used to create commands which mimic command aliases, except include specific command options or create commands that automate complex workflows. Visual Basic for Applications (or VBA) uses the foundation of Visual Basic, which is much easier to read and develop for when compared to Visual LISP and AutoLISP. It allows you to easily create custom dialog boxes and connect to other applications such as Microsoft Word and Microsoft Access. Visual LISP/AutoLISP and VBA should be thought of as entry-level program languages as they are the easiest to understand out of the four primary options available. Also, Visual LISP/AutoLISP and VBA are included with AutoCAD and require no additional software to be installed. To get started, you simply use the Visual LISP Integrated Development Environment (IDE) or the VBA IDE (see Figure 4). w w w. A U G I . c o m 26 http://www.augi.com
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.