Last active
March 6, 2024 17:29
-
-
Save rddim/9c6125f6d518d1598f04bb5081632cd1 to your computer and use it in GitHub Desktop.
Custom aliases for AutoCAD / Civil 3D commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;=========================================== [ LISP for custom aliases ] ===;; | |
;; | |
;; Custom aliases for AutoCAD / Civil 3D commands. | |
;; No need to edit the 'acad.pgp' file. It will stay untouched. | |
;; If the lisp is loaded manually it will affect only the successor drawing. | |
;; | |
;; Auto-load for any dwg file: appload > Contents... > Add... | |
;; | |
;; The comments ending with *N/A* means that there are not defined aliases in | |
;; the 'acad.pgp' file. Also all combined commands are *N/A*. | |
;; | |
;;===========================================================================;; | |
;; | |
;; Revision:...: 20240221 | |
;; Author:.....: Rusi Dimitrov | |
;; License:....: MIT | |
;; Download:...: https://gist.github.com/rddim/9c6125f6d518d1598f04bb5081632cd1 | |
;; | |
;;===========================================================================;; | |
(defun c:PUR () ;20240221 - Command 'PUR' combined for '-PURGE' + 'Regapps' + 'No' | |
(initcommandversion 1) | |
(command "_.-PURGE" "_R" "" "_N") | |
(princ) | |
) | |
(defun c:SR () ;20220509 - Command 'SR' combined for 'Scale' + 'Reference' | |
(initcommandversion 1) | |
(command "_.SELECT" pause) | |
(command "_.SCALE" "_P" "" pause "_R" "@" pause) | |
(princ) | |
) | |
(defun c:RD () ;20210916 - Command 'RD' combined for 'RECTANG' + 'Dimensions' | |
(initcommandversion 1) | |
(command "_.RECTANG" pause "_D") | |
(princ) | |
) | |
(defun c:LLD () ;20210916 - Command 'LLD' combined for 'LENGTHEN' + 'DElta' | |
(initcommandversion 1) | |
(command "_.LENGTHEN" "_DE") | |
(princ) | |
) | |
(defun c:LLT () ;20210916 - Command 'LLT' combined for 'LENGTHEN' + 'Total' | |
(initcommandversion 1) | |
(command "_.LENGTHEN" "_T") | |
(princ) | |
) | |
(defun c:LP () ;20191110 - Command 'LP' for 'LAYERP', *N/A* | |
(initcommandversion 1) | |
(command "_.LAYERP") | |
(princ) | |
) | |
(defun c:LM () ;20191110 - Command 'LM' combined for 'Layer' + 'Make' | |
(initcommandversion 1) | |
(command "_.LAYER" "_M" pause "") | |
(princ) | |
) | |
(defun c:POC () ;20191110 - Command 'POC' for 'PASTEORIG', *N/A* | |
(initcommandversion 1) | |
(command "_.PASTEORIG") | |
(princ) | |
) | |
(defun c:SE () ;20191110 - Command 'SE' for 'SELECTSIMILAR', *N/A* | |
(initcommandversion 1) | |
(command "_.SELECTSIMILAR") | |
(princ) | |
) | |
(defun c:DRF () ;20180809 - Command 'DRF' combined for 'Draworder' + 'Front' (Bring to Front) | |
(initcommandversion 1) | |
(command "_.SELECT" pause) | |
(command "_.DRAWORDER" "_P" "" "_F") | |
(princ) | |
) | |
(defun c:DRB () ;20180809 - Command 'DRB' combined for 'Draworder' + 'Back' (Send to Back) | |
(initcommandversion 1) | |
(command "_.SELECT" pause) | |
(command "_.DRAWORDER" "_P" "" "_B") | |
(princ) | |
) | |
(defun c:LD () ;20220509 - Command 'LD' combined for 'Delete layer(s)' + 'Name' | |
(initcommandversion 2) | |
(command "_.LAYDEL" "_N") | |
(princ) | |
) | |
(defun c:UW () ;20180225 - Command 'UW' combined for 'UCS' + 'World' | |
(initcommandversion 1) | |
(command "_.UCS" "_W") | |
(princ) | |
) | |
(defun c:UB () ;20180225 - Command 'UB' combined for 'UCS' + 'Object' | |
(initcommandversion 1) | |
(command "_.UCS" "_OB") | |
(princ) | |
) | |
(defun c:RR () ;20220509 - Command 'RR' combined for 'Rotate' + 'Reference' | |
(initcommandversion 1) | |
(command "_.SELECT" pause) | |
(command "_.ROTATE" "_P" "" pause "_R" "@" pause) | |
(princ) | |
) | |
(defun c:RL () ;20170726 - Command 'RL' for 'REVERSE', *N/A* | |
(initcommandversion 1) | |
(command "_.REVERSE") | |
(princ) | |
) | |
(defun c:BRR () ;20170207 - Command 'BRR' for 'Break at Point', *N/A* | |
(initcommandversion 1) | |
;(command "-osnap" "int") ;end,mid,cen,gce,nod,qua,int,ext,ins,per,tan,nea,app,par,none | |
(command "_.BREAK" pause "_F" pause "@") | |
(princ) | |
) | |
(defun c:C () ;20170807 - Command 'C' for 'COPY', instead of 'CO' or 'CP' | |
(initcommandversion 2) | |
(command "_.COPY") | |
(princ) | |
) | |
(defun c:CB () ; - Command 'CB' for 'COPYBASE' (Copy with Base Point, Ctrl+Shift+C), *N/A* | |
(initcommandversion 1) | |
(command "_.COPYBASE") | |
(princ) | |
) | |
(defun c:CC () ; - Command 'CC' for 'CIRCLE', instead of 'C' | |
(initcommandversion 1) | |
(command "_.CIRCLE") | |
(princ) | |
) | |
(defun c:CH () ; - Command 'CH' for 'CHAMFER', instead of 'CHA' | |
(initcommandversion 1) | |
(command "_.CHAMFER") | |
(princ) | |
) | |
(defun c:D () ; - Command 'D' for 'DIST', instead of 'DI' | |
(initcommandversion 1) | |
(command "_.DIST") | |
(princ) | |
) | |
(defun c:DA () ; - Command 'DA' for 'DIMANGULAR', instead of 'DAN' or 'DIMANG' | |
(initcommandversion 1) | |
(command "_.DIMANGULAR") | |
(princ) | |
) | |
(defun c:FR () ; - Command 'FR' for 'FIND' (Find and Replace), *N/A* | |
(initcommandversion 1) | |
(command "_.FIND") | |
(princ) | |
) | |
(defun c:LC () ; - Command 'LC' for 'LAYCUR' (Change to Current Layer), *N/A* | |
(initcommandversion 1) | |
(command "_.LAYCUR") | |
(princ) | |
) | |
(defun c:LF () ; - Command 'LF' for 'LAYOFF' (Turn of the layer of a selected object), *N/A* | |
(initcommandversion 1) | |
(command "_.LAYOFF") | |
(princ) | |
) | |
(defun c:LN () ; - Command 'LN' for 'LAYON' (Turn All Layers On), *N/A* | |
(initcommandversion 1) | |
(command "_.LAYON") | |
(princ) | |
) | |
(defun c:OK () ; - Command 'OK' for 'OVERKILL', *N/A* | |
(initcommandversion 1) | |
(command "_.OVERKILL") | |
(princ) | |
) | |
(defun c:PEM () ; - Command 'PEM' combined for 'PEDIT' + 'Multiple' | |
(initcommandversion 1) | |
(command "_.PEDIT" "_M") | |
(princ) | |
) | |
;;========================================================== [ Civil 3D ] ===;; | |
(defun c:MTR () ;20180809 - Command 'MTR' for 'MAPTRIM' (Boundary Trim), *N/A* | |
(initcommandversion 2) | |
(command "_.MAPTRIM") | |
(princ) | |
) | |
(defun c:SD () ;20171119 - Command 'SD' combined for 'CGSLIST' + 'Point' | |
(initcommandversion 1) | |
(command "_.CGSLIST" "_P" pause pause "") | |
(princ) | |
) | |
(defun c:BF () ;20170203 - Command 'BF' for 'BREAKFEATURES' (Break Features), *N/A* | |
(initcommandversion 1) | |
(command "_.BREAKFEATURES") | |
(princ) | |
) | |
(defun c:CF () ;20170203 - Command 'CF' for 'EDITFEATURECURVE' (Edit Curve Features), *N/A* | |
(initcommandversion 1) | |
(command "_.EDITFEATURECURVE") | |
(princ) | |
) | |
(defun c:FF () ;20170203 - Command 'FF' for FILLETFEATURE' (Fillet Features), *N/A* | |
(initcommandversion 1) | |
(command "_.FILLETFEATURE") | |
(princ) | |
) | |
(defun c:FL () ;20170203 - Command 'FL' for 'DRAWFEATURELINE' (Create Feature Lines), *N/A* | |
(initcommandversion 1) | |
(command "_.DRAWFEATURELINE") | |
(princ) | |
) | |
(defun c:JF () ;20170203 - Command 'JF' for 'JOINFEATURES' (Join Feature), *N/A* | |
(initcommandversion 1) | |
(command "_.JOINFEATURES") | |
(princ) | |
) | |
(defun c:RF () ;20170203 - Command 'RF' for 'REVERSEFEATURE' (Reverse the Direction of Features), *N/A* | |
(initcommandversion 1) | |
(command "_.REVERSEFEATURE") | |
(princ) | |
) | |
(defun c:TF () ;20170203 - Command 'TF' for 'TRIMFEATURES' (Trim Features), *N/A* | |
(initcommandversion 1) | |
(command "_.TRIMFEATURES") | |
(princ) | |
) | |
(defun c:BFA () ;20170203 - Command 'BFA' for 'CREATEARCBYBESTFIT' (Create Best Fit Arc), *N/A* | |
(initcommandversion 1) | |
(command "_.CREATEARCBYBESTFIT") | |
(princ) | |
) | |
(defun c:BFL () ;20170203 - Command 'BFL' for 'CREATELINEBYBESTFIT' (Create Best Fit Line), *N/A* | |
(initcommandversion 1) | |
(command "_.CREATELINEBYBESTFIT") | |
(princ) | |
) | |
(defun c:BFP () ;20170203 - Command 'BFP' for 'CREATEPARABOLABYBESTFIT' (Create Best Fit Parabola), *N/A* | |
(initcommandversion 1) | |
(command "_.CREATEPARABOLABYBESTFIT") | |
(princ) | |
) | |
(defun c:EFS () ;20170203 - Command 'EFS' for 'FEATUREELEVSFROMSURF' (Elevations from Surface), *N/A* | |
(initcommandversion 1) | |
(command "_.FEATUREELEVSFROMSURF") | |
(princ) | |
) | |
(defun c:C3D () ; - Command 'C3D' for 'CONVERT3DPOLYS' (Convert 3D to 2D Polylines), *N/A* | |
(initcommandversion 1) | |
(command "_.CONVERT3DPOLYS") | |
(princ) | |
) | |
;;===================================================== [ Express Tools ] ===;; | |
(defun c:AS () ;20180812 - Command 'AS' for 'ALIGNSPACE' (Align Space), *N/A* | |
(initcommandversion 1) | |
(c:ALIGNSPACE) | |
(princ) | |
) | |
(defun c:EE () ; - Command 'EE' for 'EXTRIM' (Extended Trim), *N/A* | |
(initcommandversion 1) | |
(c:EXTRIM) | |
(princ) | |
) | |
(defun c:TE () ; - Command 'TE' for 'TORIENT' (Rotate Text), *N/A* | |
(initcommandversion 1) | |
(c:TORIENT) | |
(princ) | |
) | |
;;===========================================================================;; | |
(vl-load-com) (princ) | |
(princ "\n:: Some commands are changed via the custom_aliases.lsp file ::") | |
(princ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment