Results 1 to 3 of 3

Thread: numeric command aliases

  1. #1
    Wish List Administration
    Join Date
    2011-08
    Posts
    4,581

    Default Re: numeric command aliases

    Summary: make numeric command aliases possible for existing commands and for new commands

    Description: column 1 = ## numeric aliases
    column 2 = commands, existing
    and
    column 1 can be linked to AutoLISP routines
    drag and drop would be very nice, if possible

    example

    hi There. I am right handed but use a right-handed mouse as Left-handed, with no change
    I figured out to defun C) command save etc. I now have 100's of FREE numeric LISP routines

    for basic everyday use, mostly Layers, but You can write whatever You want for any cad use.

    example,

    (defun c:0/ () (command ".layer" "t" "0" "on" "0" "s" "0" "") (princ))
    (defun c:014 () (command ".layer" "t" "0" "on" "0" "s" "0" "on" "*" "") (princ))

    (defun c:/ () (command "laymcur") (princ))
    (defun c:// () (command "laycur") (princ))
    (defun c:/// () (progn (load "mat-mtc") (c:mtc)) (princ))
    ;(defun c:/+ () (c:laylck) (princ))
    (defun c:/+* () (command ".layer" "lock" "*" "") (princ))
    (defun c:/+- () (command ".layer" "lock" "*" "unlock" (getvar "clayer") "") (princ))
    ;(defun c:/- () (c:layulk) (princ))
    (defun c:/+/ () (progn (setq ssg (entsel)) (setq ssg (cdr (assoc 8 (entget (car ssg)))))
    (command ".layer" "s" ssg "lo" "*" "un" ssg "") (princ)))
    (defun c:/-/ () (progn (setq ssg (entsel)) (setq ssg (cdr (assoc 8 (entget (car ssg)))))
    (command ".layer" "s" ssg "lo" ssg "un" "*" "") (princ)))
    (defun c:/-* () (command ".layer" "unlock" "*" "") (princ))
    (defun c:/0+ () (command ".layer" "lock" "0" "") (princ))
    (defun c:/0- () (command ".layer" "unlock" "0" "") (princ))
    (defun c:/0+* () (command ".layer" "lock" "0-*" "") (princ))
    (defun c:/0-* () (command ".layer" "unlock" "0-*" "") (princ))
    (defun c:/+0 () (command ".layer" "lock" "~0-*" "") (princ))
    (defun c:/-0 () (command ".layer" "unlock" "~0-*" "") (princ))
    (defun c:/* () (c:laymch) (princ))
    (defun c:/** () (command "_matchprop") (princ))

    other,

    (defun c:/*- () (command "options" "") (princ))

    (defun c:0 () (command "orthomode" 0) (princ))
    (defun c:1 () (command "orthomode" 1) (princ))
    (defun c:2 () (progn (command "cmdecho" 1) (command "dist") (getvar "distance")))
    (defun c:3 () (progn (command "cmdecho" 1) (command "dist" "nea" pause "per" pause) (getvar "distance")))
    (defun c:4 () (command ".osnap") (princ))
    (defun c:5 () (command "'osnap" "") (princ))
    (defun c:6 () (command "'osnap" "end,ins,int,mid,per") (princ))
    (defun c:7 () (command "'osnap" "nea,per") (princ))
    (defun c:7+ () (command "'osnap" "nea,end") (princ))
    (defun c:8 () (command "'osnap" "ins,cen") (princ))
    (defun c:9 () (command "'osnap" "ins,cen,quad") (princ))
    (defun c:00 () (progn (command nil nil nil)(command ".save" "") (princ)))
    (defun c:01 () (progn (load "lyr-lno") (c:lno)) (princ))
    (defun c:02 () (command ".qsave") (princ))
    (defun c:03 () (progn (prompt "\nwblocking to file: ") (command ".wblock" "~") (princ)))
    (defun c:04+* () (command ".xref" "r" "*"))
    (defun c:04-1 () (command ".xref" "r" pause ""))
    (defun c:04-* () (command ".xref" "u" "*"))
    (defun c:05 () (command ".xclip" pause "" "s") (princ))
    (defun c:05-1 () (command ".xclip" pause "" "n" "y" "s") (princ))
    (defun c:06 () (c:re) (princ))
    (defun c:07 () (command ".regen") (princ))
    (defun c:08 () (command ".regenall") (princ))
    (defun c:09 () (command ".redraw") (princ))
    (defun c:10 () (command "'pan") (princ))
    (defun c:11 () (command ".zoom" "w") (princ))
    (defun c:12 () (command ".zoom" ".95x") (princ))
    (defun c:13 () (command ".zoom" ".5x") (princ))
    (defun c:14 () (command "'zoom" "p") (princ))
    (defun c:15 () (command "'zoom" "d") (princ))
    (defun c:16 () (command ".zoom" "e") (princ))
    (defun c:17 () (command ".zoom" "e" "zoom" ".98x" ".save" "") (princ))
    (defun c:18 () (progn (load "vue-vsx") (c:vsx)) (princ))
    (defun c:18 () (command "view" "s" pause) (princ))
    (defun c:19 () (progn (load "vue-vrx") (c:vrx)) (princ))
    (defun c:19 () (command "view" "r" ) (princ))
    (defun c:20 () (command ".arc") (princ))
    (defun c:21 () (command ".line") (princ))
    (defun c:22 () (command ".pline") (princ))
    (defun c:22-1 () (command ".pline" pause pause "a" "s" pause pause "l" pause "c") (princ))
    (defun c:22-2 () (command ".pline" pause pause "a" "s" pause pause "s" pause pause "s" pause pause "l" pause "c") (princ))
    (defun c:23 () (command "rectang") (princ))
    (defun c:24 () (command ".polygon") (princ))
    (defun c:25 () (command ".insert") (princ))
    (defun c:25+ () (command ".insert" "~") (princ))
    (defun c:25+0 () (command ".insert" "~" "0,0,0" "" "" "") (princ))
    ;(defun c:25-0 () (progn (load "blk-blk0") (c:blk0)) (princ))
    ;(defun c:25-1 () (progn (load "blk-blk1") (c:blk1)) (princ))
    ;(defun c:25-4 () (progn (load "blk-blkx") (c:ble)) (princ))
    ;(defun c:25-5 () (progn (load "blk-blkx") (c:blkx)) (princ))
    (defun c:26 () (command ".circle") (princ))
    (defun c:26-3 () (progn (setq dsmm (getreal "\nEnter Distance in MM for Circle Radius: ")) (command ".circle" pause (/ dsmm 25.4))) (princ))
    (defun c:27 () (progn (load "n27") (c:n27)) (princ))
    (defun c:28 () (command "block") (princ))
    (defun c:28/ () (progn (setq blkn (getint "\nEnter Int for Blk-Name: ")) (setq pt0 (getpoint "\nEnter Blk-Base Pt0: "))
    (setq ssbn (ssget))
    (command ".block" blkn pt0 ssbn "")(command ".wblock" blkn "=" ) (command ".oops")) (princ))
    (defun c:28/0 () (progn (setq blkn (getint "\nEnter Int for Blk-Name: ")) (setq pt0 "0,0,0") (setq ssbn (ssget))
    (command ".block" blkn pt0 ssbn "")(command ".wblock" blkn "=" ) (command ".oops")) (princ))
    (defun c:28+ () (command "wblock") (princ))
    (defun c:29 () (command ".bhatch") (princ))
    (defun c:30 () (command ".erase") (princ))
    (defun c:30-1 () (command ".erase" "L" "")(princ))
    (defun c:30-2 () (command ".erase" "P" "")(princ))
    (defun c:31 () (command ".move") (princ))
    (defun c:31-1 () (command ".move" "L" "") (princ))
    (defun c:31-2 () (command ".move" "P" "") (princ))
    (defun c:32 () (command ".copy") (princ))
    (defun c:32-0 () (command ".copy" "m") (princ))
    (defun c:32-1 () (command ".copy" "L" "") (princ))
    (defun c:32-2 () (command ".copy" "P" "") (princ))
    (defun c:33 () (command ".offset") (princ))
    (defun c:33-1 () (command ".offset" pause "L" "") (princ))
    (defun c:33-12() (progn (setq ds12 (getreal "\nEnter Distance in FT to Offset: ")) (command ".offset" (* ds12 12))) (princ))
    (defun c:33012() (progn (setq ds12 (getreal "\nEnter Distance in FT to Offset: ")) (command ".offset" (* ds12 12))) (princ))
    (defun c:33-3 () (progn (setq dsmm (getreal "\nEnter Distance in MM to Offset: ")) (command ".offset" (/ dsmm 25.4))) (princ))
    (defun c:33-4 () (progn (setq dsm (* (getdist) 25.4)) (princ dsm)) (princ))
    (defun c:34 () (command ".trim") (princ))
    (defun c:34-0 () (command ".trim" (ssget) "" "0,0" "12000,0" pause))
    (defun c:34-1 () (command ".trim" (ssget) "" "0,0" "0,12000" pause))
    (defun c:34-2 () (command ".trim" (ssget) "" "f" pause))
    (defun c:35 () (command ".extend" pause "" pause "" (princ)))
    (defun c:35-2 () (command ".extend" pause "" "f" pause pause))
    (defun c:36 () (progn (command ".fillet" "r" "0") (command ".fillet")) (princ))
    (defun c:37 () (command ".fillet" "r" pause) (princ))
    (defun c:38 () (command ".mirror") (princ))
    (defun c:38-0 () (command ".mirror" (ssget) "" "0,0" "12000,0" "N"))
    (defun c:38-1 () (command ".mirror" (ssget) "" "0,0" "0,12000" "N"))
    (defun c:38-11() (command ".mirror" "L" "" pause pause "N"))
    (defun c:38-12() (command ".mirror" "L" "" pause pause "Y"))
    (defun c:38-21() (command ".mirror" "P" "" pause pause "N"))
    (defun c:38-22() (command ".mirror" "P" "" pause pause "Y"))
    (defun c:38-9 () (command ".mirror" pause "" pause pause "Y"))
    (defun c:39 () (command ".stretch") (princ))
    (defun c:40 () (command ".rotate") (princ))

    Product and Feature: AutoCAD - DWG

    Submitted By: randy.sanders802717 on 01/10/2023


  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420

    Default Re: numeric command aliases

    I appreciate your desire to share what you have learned, but that's what the forums are for. This is an abuse of the wish list system.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,507

    Default Re: numeric command aliases

    Quote Originally Posted by Ed Jobe View Post
    I appreciate your desire to share what you have learned, but that's what the forums are for. This is an abuse of the wish list system.
    Yes and also, most of this can be achieved with modifying the PGP file and other means like macros you create right out of the box, so it already exists in one form or another.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •