sadefa Posted December 16, 2020 Posted December 16, 2020 Hello to all. Some of you might know that whenever you might use an expression to determine the input value. For example you want a line with length of 20 you can always run command “line” and when prompted for the length write ‘cal and then 10*2. This will give line length of 20 units. What I am looking for is a way to change the ‘cal command as it’s too long for me to type it each time. Any ideas how to achieve this? Quote
tombu Posted December 16, 2020 Posted December 16, 2020 Before 'Mid Between 2 Points' was added to the 'Object Snap Cursor Menu' _none;'CAL;(cur+cur)/2; was a commonly used macro. There are many others. You haven't said what you want to do with it but adding 'CAL macros would make them easier than typing them out. With lisp you could create a command with prompts and options. 1 Quote
BIGAL Posted December 17, 2020 Posted December 17, 2020 You can call transparent commands within a lot of commands. M2P comes to mind built in as per tombu. See '2 Do Line then '2 then '4 then '2 etc the ' implies transparent then runs the defun. (defun c:2 ()(CAL "(end+end)/2.0")) (defun c:3 ()(CAL "plt(end,end,1/3.0")) (defun c:4 ()(CAL "plt(end,end,0.25)")) This was mentioned in another post recently how do to a length of x units in a direction maybe a week ago, for ortho lines pick 1st point drag mouse type value eg 20. Very quick for X & Y type lines. Quote
steven-g Posted December 17, 2020 Posted December 17, 2020 (edited) You can add a command alias to your pgp file so you only need type an apostrophe folowed by a single keyboard letter, so at the end of the pgp file add this (I just picked 'K' because 'C' is used so often for other things. K, *CAL So when you want to use the CAL command transparently you only need type 'K unfortunately you cannot add K, *'CAL as an alias the apostrophy isn't accepted as a valid entry, but using something like 'K still saves 50% of your keypresses. You do need to run the REINIT command after you save the pgp file to make changes to your pgp file available to use. Or you could create a new command in the CUI 'CAL and run it from an icon in your ribbon or a toolpalette with a single mouse click (but that might not be any quicker if you have to move the mouse to an icon everytime you need it. Edited December 17, 2020 by steven-g 1 Quote
Dadgad Posted December 17, 2020 Posted December 17, 2020 (edited) If you are inclined to go with steven-g's suggestion, try using the aliasedit command to access your PGP file easily on the fly. As shown in this screenshot. Done this way you won't need to run the REINIT command, but DO make sure you click the confirmation OK buttons as you click out of each dialog box. Edited December 18, 2020 by Dadgad Trying to delete multiple insertions. Quote
steven-g Posted December 17, 2020 Posted December 17, 2020 @Dadgad +1 Unfortunately as an LT user I don't have many of these advanced features Quote
Dadgad Posted December 17, 2020 Posted December 17, 2020 @steven-g +1. You are well known to be a wizard of LT and inclined to find clever ways to coax it into doing things it is not designed to do! I used to always edit my customizations at the very bottom section of the PGP, but done this way, that is where they go by default, so that at a later date they will migrate with an upgrade to a newer version. 1 Quote
BIGAL Posted December 18, 2020 Posted December 18, 2020 Dadgad can see numbers being used stops any probs with shortcut alpha keys, 47 is osmode 47. Re lengths made U D L R lisp Type l123 u45 r56.76 d34.6 etc draws ortho lines in direction up down etc. 1 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.