HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

How to change CAD shortcut key settings?

2010-03-30View Original

Thread Content

In CAD version 14, how do I change the CAD shortcut key settings? Please ask classmates for advice.
Reply #22010-03-30
acad.pgp or written in LISP
Reply #32010-03-30
Here is one I wrote myself, for educational reference only;===========================================================Left mouse button ;;========================================Custom function library ;;===== First, obtain the AutoCAD object (vl-load-com) (setq *acad* (vlax-get-acad-object)) ;;===== Then get the current document (setq *doc* (vlax-get-property *acad* 'ActiveDocument)) ;;===== After that, send commands to the current document, with the command parameters as strings. ;;===== The format of the commands is the same as when entering commands manually; remember to use spaces to indicate confirmation. ;;===== If there is no space at the end, the command will be written to the command line but not executed immediately. ;;For example: (defun c:B () (vla-sendcommand *doc* "BLOCK ")) Here, “B” is a custom shortcut command, while “BLOCK” is a system command. ;;=======================================List of Shortcut Commands;;=====Single-key commands (defun c:A () (command “ARC”)); Arc (defun c:B () (vla-sendcommand *doc* “BLOCK”)); Block definition (defun c:C () (command “CIRCLE”)); Circle (defun c:D () (vla-sendcommand *doc* “DIMSTYLE”)); Dimension style (defun c:E () (command “ERASE”)); Delete (defun c:F () (COMMAND “FILLET”)); Fillet (defun c:R () (COMMAND “REGEN”)); Regenerate model (defun c:S () (COMMAND “STRETCH”)); Stretch (defun c:T () (COMMAND “_.TRIM” „“)); Trim (automatically trims the nearest part) (defun c:V () (COMMAND “MOVE”)); Move (defun c:W () (vla-sendcommand *doc* “WBLOCK”)); Write block (defun c:X () (COMMAND “EXPLODE”)); Explode (defun c:Z () (COMMAND “ZOOM”)); Zoom ;=====Combined-key commands (defun c:ZX () (COMMAND “LINE”)); Line (defun c:CR () (vla-sendcommand *doc* “INSERT”)); Insert (defun c:XX () (COMMAND “OPTIONS”)); Options (defun c:GS () (COMMAND “MATCHPROP”)); Format brush (defun c:BZ () (SETVAR “OSMODE” 15359)); Object snap (defun c:AD () (COMMAND “APPLOAD”)); Load application (defun c:SC () (COMMAND “SCALE”)); Zoom in/out (defun c:ST () (vla-sendcommand *doc* “STYLE”)); Text style (defun c:RE () (COMMAND “RECTANG”)); Rectangle (defun c:RT () (COMMAND “ROTATE”)); Rotate (defun c:DV () (COMMAND “DIVIDE”)); Divide into equal parts (defun c:FD () (COMMAND “FIND”)); Find (defun c:BB () (vla-sendcommand *doc* “BHATCH”)); Hatch (defun c:BR () (COMMAND “BREAK”)); Break (defun c:EX () (COMMAND “_.EXTEND” „“)); Extend (automatically extends to the nearest intersection point) (defun c:VE () (COMMAND “MOVE”)); Move (defun c:CF () (COMMAND “CHAMFER” “u”)); Chamfer (defun c:wb () (vla-sendcommand *doc* “wblock”)); Write block (defun c:DW () (COMMAND “dimaligned”)); Diagonal dimensioning (defun c:WW () (COMMAND “MIRROR”)); Mirror (defun c:ED () (COMMAND “PEDIT”)); Convert between multi-line and single-line segments (defun c:DB () (COMMAND “POLYGON”)); Polygon (defun c:EE () (vla-sendcommand *doc* “LINETYPE”)); Line type manager (defun c:AE () (vla-sendcommand *doc* “LAYER”)); Layer manager (defun c:DT () (COMMAND “DIST”)); Measure distance (defun c:EF () (vla-sendcommand *doc* “XREF”)); X-reference (defun c:TT () (COMMAND “TEXT”)); Single-line text (defun c:DE () (setvar “osmode” 15359) (COMMAND “DIMLINEAR”)); Linear dimensioning (defun c:DR () (COMMAND “DIMRADIUS”)); Radius dimensioning (defun c:DD () (COMMAND “DIMDIAMETER”)); Diameter dimensioning (defun c:DA () (COMMAND “DIMANGULAR”)); Angular dimensioning (defun c:DC () (COMMAND “DIMCONTINUE” “s”)); Continuous dimensioning (defun c:qd () (COMMAND “qdim”)); Quick dimensioning (defun c:DL () (COMMAND “DIMBASELINE” “s”)); Baseline dimensioning (defun c:DTE () (COMMAND “DIMTEDIT”)); Edit dimension text ;;=====Modifying shortcuts;; For example, change shortcut BBB to AAA; (defun c:AAA () ;(C:BBB) ;) ;Command compression format; (defun c:Abbreviation () (command “Command” “Options in command line” “Options in command line” “Options in command line” „“)); Example: Use sw key as a shortcut for entering southwest view; the program is; (defun c:sw () (command “-view” “swiso”)); Use combined key qc1 to change a line to one with color 8, line type as center dash, and line scale of 1000; the program is; (defun c:qc1 () (command “change” (ssget) „“ “p” “ltype” “center” “c” “10” “lts” “1000” „“)); Command combination format; (defun c:Abbreviation () (command “Command 1” “Options in command line” pause pause “Command 2” “Options in command line” „“)); Example 4: Use combined key a4 to draw a quadrilateral and fill it; the program is; (defun c:a4 () (command “polygon” “4” “e” pause pause “hatch” “s” “l” „“)); D. Syntax explanation: ; defun indicates defining a function. ; c: indicates that the command is independent of the hard drive. ; ssget pauses, waiting for the user to make a real-time selection before proceeding with subsequent operations. It’s equivalent to right-clicking; pause pauses, waiting for the user to specify a point before carrying out further actions. ; „“ is used to end the selection
Reply #42010-03-30
Why still use CAD14? There are so many newer versions of CAD – why not use those?
Reply #52010-03-31
CAD14 requires VLISP to be installed in order to support VLISP functions. Modify acad.pgp or write it in Lisp.

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.