alanjt Posted May 22, 2010 Posted May 22, 2010 Ever wanted to execute a command and only use a specific OSnap? Well, now you can and you only have to execute one command and it does NOT affect running Osnaps. I've been using this for over a year and loving it. I finally sat down and did a rewrite and added a new option to add custom LISP routines to the list of available commands and I thought I'd share it. Command choice is stored in the registry, so once you set it, it's there until you decide to use it with a different command. In the code, I added the usage for every available OSnap. However, these can be removed and any additional combination can be added. See examples. Read area below marked in red for more information. ;;; ------------------------------------------------------------------------ ;;; QuickSnaps.lsp v1.2 ;;; ;;; Copyright© 02.07.09 ;;; Alan J. Thompson (alanjt) ;;; ;;; Contact: alanjt @ TheSwamp.org, CADTutor.net ;;; ;;; Permission to use, copy, modify, and distribute this software ;;; for any purpose and without fee is hereby granted, provided ;;; that the above copyright notice appears in all copies and ;;; that both that copyright notice and the limited warranty and ;;; restricted rights notice below appear in all supporting ;;; documentation. ;;; ;;; The following program(s) are provided "as is" and with all faults. ;;; Alan J. Thompson DOES NOT warrant that the operation of the program(s) ;;; will be uninterrupted and/or error free. ;;; [color=Red];;; Gives OSnap Overrides two possible functions. ;;; 1. Function normally when called within another command. ;;; 2. Assign a specific command (chosen from list and stored in registry) ;;; to an OSnap override. When the command is executed, if not already ;;; defined, the user is given a list of commands to choose from. Once ;;; set, the command will issue (eg. line, arc) and begin using the ;;; defined OSnap override(s). ;;; ;;; By default, all available OSnap overrides have been defined as a function (name = Osnap). ;;; ;;; User can also add custom LISP routine commands to command list. ;;; * * * Must be added in form: "(c:CommandName)" * * * ;;; ;;; Arguments: ;;; snap - Desired OSnap overrides(s) (multiple accepted) ;;; ;;; Examples: ;;; (defun c:endp (/) (AT:QuickSnaps "_endp") (princ)) ;end point osnap override ;;; (defun c:int (/) (AT:QuickSnaps "_int") (princ)) ;intersection osnap override ;;; (defun c:nea (/) (AT:QuickSnaps "_nea") (princ)) ;nearest osnap override ;;; (defun c:endp-int (/) (AT:QuickSnaps "_endp,_int") (princ)) ;end point & intersection osnap override[/color] ;;; ;;; Revision History: ;;; ;;; v1.1 02.19.09 1. Added display of active command to commandline. ;;; ;;; v1.1 05.21.10 1. Complete rewrite. ;;; 2. Added option add custom LISP routines to command list. ;;; ;;; ------------------------------------------------------------------------ Native AutoCAD command usage: Custom LISP routine usage: I used my DistanceInquiry as the example. Found here. Comments and criticism are always appreciated. Enjoy guys. Quote
NBC Posted May 22, 2010 Posted May 22, 2010 Looks like some fun alan, I'll have a play with this on monday Quote
Montinho Posted May 23, 2010 Posted May 23, 2010 Alan, i'd love to know how to make some of those animated gifs captures. can you tell me what software do you use for it? Cumps Quote
alanjt Posted May 24, 2010 Author Posted May 24, 2010 Looks like some fun alan, I'll have a play with this on monday Helps me in my day-to-day work. Enjoy. Alan, i'd love to know how to make some of those animated gifs captures. can you tell me what software do you use for it? Cumps Ugh, Camtasia. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.