You are on page 1of 18

Page 1 AUTOPICK 3.0 ============== Eric Michalowsky Cohen and Kanwar, Inc.

Consulting Electrical Engineers 1753 Cloverfield Boulevard Santa Monica, CA 90404 Voice (213) 829-7535 Fax (213) 829-7950 Modem (213) 829-7151 CompuServe 72070-3704

Welcome to AUTOPICK 3.0 - AutoCommand* for large drawings. QUICK START ============ The best and quickest way to use/learn this routine is to copy the file to your AutoCAD directory, enter AutoCAD, load it and run it. Default Configuration: i - "copy c:\??\autopick.lsp c:\acad\autopick.lsp" ii - get into AutoCAD in any drawing iii - "(load "AUTOPICK")" iv - "ap" For those people with a non-standard configuration or who are not familiar with DOS and AutoLisp, check your DOS and AutoCAD manuals for instructions. HIGHLY RECOMMENDED: Once the routine has been loaded enter the command at the Command prompt as: "MULTIPLE AP" This will ensure that the command will repeat itself until you cancel. Because the routine encompasses so many of the commands used most of the time, you can stay in this one routine 90% of your drawing day!!!!! *AutoCommand is a routine that is very similar to AUTOPICK with one major difference - AutoCommand uses the crosshairs to recognize entities in the drawing, displays info. about the entity in the status line and then allow the user to use this information to add or edit entities. (See Cadence Magazine - November 1991 for a review by Ralph Grabowski.) Because of the "nature of this beast" and AutoCAD - every time you move the crosshairs AutoLISP checks to see if there is an entity there and checks the dat base for pertinent information - AutoCommand is *very* slow and the crosshairs appear to "skip" on large drawings and slow computers. This is the reason for my developing AUTOPICK. If you would like to check out a copy of AutoCommand, download the file "AUTOCM.ZIP" from the ACAD forum, leave me a message or send a check for $15.00 to the above address and specify "AutoCommand".

Page 2 SUMMARY ======== AUTOPICK is one AutoLISP routine that can perform the following functions (in alphabetical order): COMMAND TYPE ======== ===== Arc AutoCAD Array AutoCAD Block Entities to Bylayer AutoLISP Count & Hilight Blocks AutoLISP Update all of a part. block AutoLISP Insert any block AutoCAD Explode with entity manipulation AutoLISP Replace selected blocks with another AutoLISP Scale selected blocks AutoLISP Multi-Explode AutoLISP Break AutoCAD Circle AutoCAD Donut AutoCAD Copy AutoCAD Ellipse AutoCAD Erase AutoCAD Explode AutoCAD Grid AutoCAD Hatch AutoCAD Layer 1 on by picking - all others off AutoLISP All on AutoCAD Color - set color for layers AutoCAD Ddlmodes AutoCAD Erase - delete all entities on a lyr AutoLISP Freeze - freeze a layer AutoCAD Ltype - set linetype for layers AutoCAD Make - make a layer AutoCAD New - create new layers AutoCAD Off - switch layers off by picking AutoLISP Set - set current layer by picking AutoLISP Thaw - thaw layers AutoCAD Limits AutoCAD Line AutoCAD Ltscale AutoCAD Mirror AutoCAD Move AutoCAD Offset AutoCAD

Page 3 Pan 2 points 1 screen down 1 screen left 1 screen right 1 screen up Pdmode Pdsize Pedit Point Polygon Polyline Redraw Rotate Scale Snap Stretch Style Text Continue with same style/height/etc. Edit Height change Justification change Replace strings Style change X-Value change Undo Zoom All Biggest (largest with no regen) Extents Previous Smallest (with no regen) Window

AutoCAD AutoLISP AutoLISP AutoLISP AutoLISP AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoLISP AutoCAD AutoLISP AutoLISP AutoLISP AutoLISP AutoLISP AutoCAD AutoCAD AutoCAD AutoCAD AutoCAD AutoLISP AutoCAD

Page 4 MAIN MENUS =========== The routine has been divided up into twelve sections or one Main menu and eleven sub-menus. The main menu offers the following choices: a. Add - to add new entities to the drawing b. Block - several block manipulation commands c. Cmnd - to run an AutoCAD command or lisp routine not included in AUTOPICK d. Edit - edit existing entities e. List - non-flip, graphic screen list function f. Mimic - to add entities based on existing entities g. Run - load and run an AutoLISP routine h. Setup - set several key drawing parameters i. Text - several text manipulation commands j. Layer - several layer manipulation commands k. Zoom - several zoom commands You will also find that nearly every menu offers the option to Undo the last command and redraw the screen - commands that should always be at your fingertips - and the ability to go straight to the Layer and Zoom menus without having to go back to the Main Menu. Included with every menu is a context sensitive help screen to explain what each command does. The following section will go into each sub-menu in detail.

Page 5 SUB-MENUS ========== ADD - This menu is to add new entities to the drawing. The following options are available: Arc, Circle, Donut, Dtext, Ellipse, Hatch, Line, Point, Polygon, and Polyline. You are also able to go straight to the layer and zoom menus and can undo and redraw from this menu. When one of these options is selected, the standard AutoCAD command is run. BLOCK - This menu deals with many options to do with the manipulation of blocks. The following options are available: Bylayer - This option is used to change the color of all entities that comprise a block to BYLAYER. It is extremely useful when receiving drawings from others that need to be changed to meet your specifications. If a block has been made with entities that have a particular color, the only way to change this color is to explode and remake the block. The Bylayer option does this automatically for you. You are prompted to select blocks or to press Enter for all the blocks in the drawing. The routine then aut omatically explodes the blocks, changes the color of entities in each block to Bylayer and remakes the blocks. Blocks are not left exploded so drawing size stays small. Their are two instances in which this routine will not work - i. when the block has been inserted with differing X and Y values, thereby making it impossible to explode and ii. when there are attributes in the block. In both cases the routine will inform you of their presence and will report the names of the guilty blocks so that they can be changed manually. Count - This option will prompt you to enter a block name. Once entered, it will blank the screen and redraw every occurrence of the block entered and will report how many similar blocks have been found. You will be asked if you would like to enter another block name. Pressing Enter will end the routine. At this stage, do a redraw in order to bring the full drawing back.

Page 6 Update - This option will allow you to update every occurrance of a particular block to another particular block. You will first be warned that EVERY occurrence of the initial block picked will be redefined. If you respond to continue, the routine will prompt you to select a block to be redefined and then to pick the block you want it to be changed to. The routine will then redefine the blocks and will Zoom Extents to see the changes (a regeneration has to be done to see the changes). This routine is al so very useful when receiving drawings from others that have blocks that you wish to change to your own standards. Insert - This option will call the standard AutoCAD INSERT command with all the usual prompts. Lexplode - stands for Layer Explode. For this routine, I have "borrowed" the XPLODE.LSP routine from the AutoCAD bonus/sample diskette. If you do not already have it in your library of AutoLISP routines, you will have to "install" it from the appropriate diskette. See the AutoCAD reference manual for instructions - or if you have problems, let me know. As this routine is very powerful and fairly complex, I suggest you read the documentation in the AutoLisp Reference Manual. It will allow you to explode multiple blocks while specifying, either globally or individually, the attributes (color/layer/linetype) of the exploded entities. Mimic - this option will take you directly to the Mimic menu where you will be able to insert a copy of any of the existing blocks at the same scale by just picking the existing block on the screen. The correct layer will be set, as well as the correct block name and scale. You never have to remember block names again! Replace - This is similar to the Update option, although it allows you to select which blocks to redefine - as opposed to every occurrence of a particular block. You will be prompted to select (with all the regular AutoCAD selection methods) which blocks you want redefined. You are then asked to pick the block to define them to. Once picked, every block in your selection set will be changed to that of the block picked. This is yet another very useful routine when receiving drawings from others. Scale - This option will scale every block selected by a particular scale factor. The insertion point of each block will be automatically used for the base point. You are prompted to select all blocks to scale, and then for a scale factor. Once entered, each block will be scaled accordingly.

Page 7 Mexplode - Short for multi-explode, this option will allow you to explode any number of blocks, polylines or dimensions. This command will also explode blocks that are mirrored, ie. with X being equal to negative Y.From this menu you are also able to Quit to the Main Menu, Undo the last command, Redraw the drawing, or go directly to the Layer or Zoom Menus. As always there is context sensitive help. CMND - This menu allows you to run any AutoCAD command or lisp routine that is not included in AUTOPICK. This option is very useful when you have entered AUTOPICK with the "MULTIPLE AP" option in that it will allow you to run the dimension command, as an example, without ever leaving AUTOPICK. EDIT - The following options are offered in this menu (depending on what entity is picked - see below): Array, Break, Copy, Erase, Explode, Mirror, Move, Offset, Pedit, Rotate, Scale, Stretch. The first prompt you will see is to pick an entity. The entity will be listed in the same manner as the List option (see below) and you will then be presented with the Edit options. Only those commands that apply to the entity picked will be offered. For example, if a block is picked the break, pedit and offset commands will not be offered. If a line is selected, the explode command will not be offered. Once an entity has been picked and a command selected (by pressing the appropriate letter and Enter), the command will be started and the entity picked will be the first one selected (because of the nature of the command, this does not apply to the Stretch command). The array, copy, erase, mirror, move, rotate and scale commands will allow you to add entities to the selection set. This does not apply to the stretch command as you have to use crossing or win dow. If break is selected, the point picked can be used automatically as the first point for the break or the "F" option in the break command can be used. If explode is selected, the picked entity will be exploded - if possible. If not possible you will get an error message. If offset is selected, you will be prompted to enter the offset distance and the entity picked is then selected and you are prompted to pick a side. You may then continue as with the regular offset command. You are also able to go directly to the Text, Zoom and Layer menus at this point and can also Redraw and Undo or return to the Main Menu.

Page 8 LIST - When this option is selected, you are put into a loop and asked to select an entity - until you pick open space or until you press Enter. The entity will be listed in the three lines at the bottom of the screen or on the second monitor, if existing. The screen will not flip into text mode. The information listed depends on the entity picked. For most entities you will be told what the entity is (Line, Arc, etc.), what layer it is on and what color it is (Bylayer or otherwise). There are a couple of exceptions (added bonuses): Text - when text is picked, you will see something like: "<LIST> TEXT- H:9.0 S:txt X:1.2 J:M on layer 0 with color RED" This listing tells you that the entity picked was text, its height is 9.0", its style is "txt", its width or x-value is 1.2, its justification is "MIDDLE", its on layer 0 and its color is "RED". Block - when a block is picked, as well as being told the layer and color of the block, you are told the name of the block, the scale and the rotation angle. If the X, Y and Z scales are equal, you will only see one number - that scale. If they are different you will see three numbers (if there is a Z) or two numbers - these are presented in the same order as the one the computer uses when inserting a block - X, Y, then Z. After the scale (or scales) you will see the "<" (at an angle of) symbol and the angle will be shown. MIMIC - This part of the routine allows you to add new entities based on entities existing in the drawing. It asks you to pick an entity, from the drawing, that you wish to add. The picked entity will be listed in the same manner as the List option does (see above). AutoCAD will then change to that entity's layer and color and start the necessary command. Several entities have "added bonuses". They are: Line - when a line is picked, you are able to continue the line at the nearest endpoint from the point picked or to draw a new line elsewhere. Circle - when a circle is picked, you are able to draw a circle with the same center point as the circle picked or to draw a new circle elsewhere. Insert - when a block is picked, you are able to insert the same block at the same scale (you are prompted for the insertion point and rotation angle) or to insert a different block anywhere.

Page 9 Text - when a string of text is picked, you are able to continue text directly under the picked line (with the same justification, style, height, x-value, layer, etc.) or to press "E" to start the Dtext command elsewhere. If you would like to start text with the same style, layer, justification, etc. as an existing line of text, you can pick an existing line and then, when prompted for the text, you can pick the new point where you want the text to be. For any other entities, the command associated with that entity is started. For example if a donut is picked, because it is a polyline by nature, the polyline command is started (the same applies to ellipses and polygons). Note that if a dimension is picked, the "DIM" command will be run, however, if you have already exploded the dimension, then the entity picked will be a line or text so those commands will be started. QUIT - this will quit the routine and take you back to the AutoCAD "command:" prompt. If you are using AUTOPICK with the "MULTIPLE AP" option, you will need to do a "CTRL-C" to quit. RUN - this option will automatically load and run an AutoLISP routine for you. There is one stipulation however! The FILE NAME of the AutoLISP routine must be the same as the COMMAND used to run the routine. For example, if the file name is called AUTOPICK.LSP and the command to run it is called AP, then this will not work. The two names have to be the same. SETUP - This option is used to set certain parameters and drawing aids. The following options are available: Grid, Limits, LtScale, PdMode, PdSize, Snap and Style. When the appropriate letter is pressed, the corresponding AutoCAD command will be run. You are also able to go directly to the Layer and Zoom menus from this menu.

Page 10 TEXT - This menu contains several options that relate to text manipulation. The following options are offered in this menu: Cont -with this option you are asked to pick a line of text. You are then able to continue text directly under the picked line (with the same justification, style, height, x-value, layer, etc.) Edit - this will ask you to pick the line to edit and revision 11's dialogue box will be opened with the selected text. Once the text has been edited, you can continue editing text as if you had started the command from the AutoCAD prompt. Hght - this option allows you to change the height of selected text or all the text in the drawing to a new entered height. Just - this allows you to change the justification of selected text or all the text in the drawing to any of revision 11's justifications. Repl - this allows you to change any number of similar strings in a line of text to any other string. For example, to change the year on many lines of text from 90 to 91, you select the lines of text, enter "90" when prompted for the old string and "91" when prompted for the new string and the routine will change all lines with 90 anywhere in it to "91". Beware when using this option as the string to change must be unique and upper and lower case are taken into consideration. Styl - this allows you to change the style of selected or all text to a different style. If the style does not exist you will be informed. X-val - this allows you to change the x-value (width) of selected or all the text in the drawing to a different value. You can also go directly to the Layer or Zoom menus from this menu.

Page 11 LAYER - This menu contains several options (AutoLISP and regular AutoCAD) that relate to layers and layer manipulation. The following options are offered in the Layer menu: 1 on - this is an AutoLISP routine that will allow you, through picking an entity, to make the layer of the entity picked current and switch all other layers off. All on - this will switch every layer on. As it uses the AutoCAD layer command, layers that are frozen will not be visible and will stay frozen. Clr - this will start the AutoCAD layer command with the "Color" option automatically entered.1 Ddl - this will run the AutoCAD DDLModes command for layer setup.1 Ers -this is an AutoLISP routine that will, after you have picked an entity, delete every entity on the same layer as the entity picked. This command should be used with care as it will also erase entities that may not be seen on the screen but are still on the layer selected. Frz - this is an AutoLISP routine that will freeze a layer associated with an entity picked. Ltype - this will start the AutoCAD layer command with the "Linetype" option automatically entered.1 Make - this will start the AutoCAD layer command with the "Make" option automatically entered.1 New - this will start the AutoCAD layer command with the "New" option automatically entered.1 Off - this is an AutoLISP routine that will switch off a layer associated with an entity picked. Set - this is an AutoLISP routine that will set (make current) a layer associated with an entity picked. Thaw - this will start the AutoCAD layer command with the "Thaw" option automatically entered.1 1 - all these commands, because they are "open ended" (the command is only over when you press Enter a couple of times - unlike "closed ended" AutoLISP), will return you to the AutoCAD command prompt. The other commands will return you to the menu you were in when you invoked the Layer Menu.

Page 12 ZOOM - This menu contains options (AutoLISP and regular AutoCAD) that relate to zooming and panning a drawing. The following options are offered: Zoom: A - this is the standard AutoCAD "Zoom All" command - a regeneration is forced. B - this is the revision 11 "Zoom V" command -the computer will zoom to the largest possible view size without regenerating. This option allows you to see the largest amount of the drawing without having to regenerate. This is the opposite of the "Smallest" option (see below). E - this is the standard AutoCAD "Zoom Extents" command - a regeneration is forced. P - this is the standard AutoCAD "Zoom Previous" command - the drawing may regenerate. S - this is an AutoLISP routine that will zoom to the largest possible magnification without a regeneration. This is the opposite of the "Biggest" option (see above).2 W - this is the standard AutoCAD "Zoom Window" command - a regeneration may occur. Pan: 2 - this is the standard AutoCAD pan command. You will be prompted to pick two points and the drawing will pan. D - this is an AutoLISP routine that will pan the drawing one screen down. The distance panned is slightly smaller than the height of the screen.2 L - this is an AutoLISP routine that will pan the drawing one screen to the left. The distance panned is slightly smaller than the width of the screen.2 R - this is an AutoLISP routine that will pan the drawing one screen to the right. The distance panned is slightly smaller than the width of the screen.2 U - this is an AutoLISP routine that will pan the drawing one screen up. The distance panned is slightly smaller than the height of the screen.2 Note: The Expert variable has been set (and will be reset to your standard after zooming) so that in every instance, if the computer needs to regenerate, it will do so without asking. 2 - Because these routines differ according to the size of the monitor, the drawing may pan more or less than expected.

Page 13 ? - The question mark option at any menu will switch to the text screen and display a context sensitive help screen for that particular menu. W - This option at most menus will run the standard AutoCAD Redraw command. U - This option at most menus will run the standard AutoCAD "U" command and will undo the last command performed. Q - This option at the Main Menu will end the routine. If selected at any other menu, it will return you to the Main Menu. Because of the nature of AutoLISP and the extent to which it has been developed, certain commands will take you back to the AUTOPICK menu you were in or to the Main Menu, while other commands will drop you out at the AutoCAD "Command:" prompt. If it drops you out at the prompt, you can simply press Enter to rerun the routine or I would highly recommend that you run the routine with the "Multiple" option of AutoCAD ("MULTIPLE AP") so that the command repeats itself until you issue a "Ctrl-C". This way you c an use this one command for 90% of the creating and editing that you do.

Page 14 RESTRICTIONS ============= Only a certain number of characters will be shown in the command prompt area. If the <LIST> options are too long, the list will scroll on the next line and the first line will not be seen. Therefore, if you are using AEC or use blocks or layers with long names, the entities and information may be too long and you will have to look at the text screen (by pressing "F1"). I would recommend trying to keep these names short. My layers and blocks are approximately 8 letters long each and the command works fine. As colors past color 7 are not standard, AUTOPICK will only report the number. However, if you wish to change the number to a name (as I have on my system) use a text editor or word processor in non-document mode and change the following code: From: ((= ((= ((= ((= ((= ((= ((= ((= To: ((= ((= ((= ((= ((= ((= ((= ((= h h h h h h h h h h h h h h h h 8) 9) 10) 11) 12) 13) 14) 15) 8) 9) 10) 11) 12) 13) 14) 15) (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq (setq clr clr clr clr clr clr clr clr clr clr clr clr clr clr clr clr "8")) "9")) "10")) "11")) "12")) "13")) "14")) "15")) /------- Enter your color names here "orange")) "lime")) "teal")) "lt.blue")) "purple")) "fuchsia")) "dk.grey")) "lt.grey"))

or whatever your colors are but keep them short. If you do not know how to do this or need any help, register the routine and then write to me, call me or leave a message on Compuserve for me and I will see what I can do.

Page 15 BUGS/SUGGESTIONS/REGISTRATION/ETC. =================================== I have checked the routine for bugs several times but am human -if you find any, please let me know and I will try to fix 'em. There also may be commands that I have forgotten to remove that are specific to my machine/blocks/etc. If I have left any in, please forgive me - I will repent... I would really appreciate any comments or suggestions If you use the routine for more than two weeks, I would recommend that you register. There are several benefits for you on registration. You will receive the latest version of the software, you will receive a "desk-top published" copy of the manual and you will receive first notice of any upgrades and other useful AutoLISP routines I develop. Registration only costs $20.00 - I certainly hope a lot less than the money you will save using this routine and it also serves as encouragement for me to continue improving on AUTOPICK. I really hope you like AUTOPICK and that it gives you the competitive edge and profit margin you deserve. ERIC MICHALOWSKY Cohen and Kanwar, Inc. Consulting Electrical Engineers 1753 Cloverfield Boulevard Santa Monica, CA 90404

Voice: (310) 829-7535 Fax: (310) 829-7950 Modem: (310) 829-7151 C-Serve: 72070,3704

CREDITS ======== Credit should be given where credit is due. I have used several routines that I have "picked up" in the past and added/edited them. I have unfortunately not kept track of who wrote what so, for all those "unknown AutoLISP programmers" that have given me guidance, thank you all. I would like to acknowledge and thank Jan S Yoder and K.C. Jones for the use of XPLODE.LSP which I access in the block section of AUTOPICK. I would also like to thank William So for his help in Beta testing early versions of AutoCommand and AUTOPICK, Joseph Schwantner for his encouragement and guidance and help and Tony Tanzillo for his amazing knowledge of Lisp and his will to spread it.

Page 16 CUSTOMIZATION ============== As every drafter has their own unique way of doing things (especially in AutoCAD), the set-up and/or commands in AUTOPICK may not be optimal. I can, therefore, customize AUTOPICK to suit the needs of most tasks/ draftsmen/designers. If you would like particular commands, such as dimensioning, or other AutoLISP routines to be added to AUTOPICK I can hopefully change the program to best suit your needs. However, because it is a "one-of-a-kind" type thing I will have to charge for registration as well as for th e changes. As the changes may be simple or extremely difficult, I will have to "quote" on any such changes but as I learn while I add/change it shouldn't be too expensive. If you would like a customized version of AUTOPICK for your office/needs, either send me a message, call me at the number in this documentation or write to me at the address in this documentation and I will get back to you as to the feasibility and charge.

Page 17 THE USUAL WARRANTY AND DISCLAIMER ================================== This program/routine is provided AS IS. Eric Michalowsky MAKES NO WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. Registered Version ONLY Warranty: Eric Michalowsky warrants the physical diskette(s) provided with registered versions to be free of defects in materials and workmanship for a period of sixty days from the date of registration. If Eric Michalowsky receives notification within the warranty period of defects in materials or workmanship, and such notification is determined by Eric Michalowsky to be correct, Eric Michalowsky will replace the defective diskette(s) or documentation. The entire and exclusive liability and remedy for breach of this Limited Warranty shall be limited to replacement of defective diskette(s) and shall not include or extend to any claim for or right to recover any other damages, including but not limited to, loss of profit, data, or use of the software, or special, incidental, or consequential damages or other similar claims, even if Eric Michalowsky has been specifically advised of the possibility of such damages. In no event will Eric Michalowsky's liabili ty for any damages to you or any other person ever exceed the lower of suggested list price or actual price paid for the license to use the software, regardless of any form of the claim. Eric Michalowsky SPECIFICALLY DISCLAIMS ALL OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTY OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

You might also like