AutoCAD 2002 Bible

Скачать в pdf «AutoCAD 2002 Bible»

♦    For the COPY command, you might want to add some OSNAP changes that you can use transparently in the middle of the command. For example, you could turn OSNAP off or set an Endpoint object snap.

Figure 33-11 shows a possible command menu, which turns the running OSNAP off and sets OSNAP to endpoint, using the OSMODE system variable.






OSNAP Off OSNAP Endpoint

Figure 33-11: A custom command menu that appears when you right-click during the COPY command

Here’s the code for the menu file:



[Context menu for COPY command]

ID_Osmode    [OSNAP Off]’osmode 0

ID_OsmodeEnd    [OSNAP Endpoint]’osmode 1

Note that you cannot create a similar menu for the MOVE command because the MOVE command doesn’t have any options. Therefore, you can’t right-click to open a shortcut menu.

Step-by-Step: Creating a Context-Sensitive Object Menu

1. If you did the exercise on customizing the Buttons menu, start WordPad by choosing Start О Run, typing wordpad, and clicking OK. Open abl.mns from the AutoCAD 2002Support folder. Choose File О Save As and save it as ab3.mns. Use Windows Explorer to find abl.mnl in AutoCAD 2002Support. Click it and rename it ab3.mnl. Then go to Step 3.

Don’t continue with this exercise without first completing Step 1. If you are working on someone else’s computer, ask permission before doing this exercise.

2.    If you didn’t do the exercise on customizing the Buttons menu, copy acad.mnu, acad.mns, acad.mnc, acad.mnr and acad.mnl to a floppy disk. Then right-click acad.mns (which is in AutoCAD 2002Support) in Windows Explorer and choose Copy from the shortcut menu. Right-click again and choose Paste. Windows places a copy of acad.mns, called Copy of acad.mns in the same folder. Click the copied menu file and type ab3.mns J. Find acad.mnl and rename it ab3.mnl. Start WordPad (choose Start О Run, type wordpad, and click OK). Open ab3.mns.

Скачать в pdf «AutoCAD 2002 Bible»