jt6572 Posted February 3, 2021 Posted February 3, 2021 hi All, Im sorry if this has been posted a billion times, but I am on a tight schedule atm. Im having trouble reassigning the F4 and F5 keys. I like to have them override the end and intersection snaps respectively. I have edited the CUI as below but pressing F4 still just fires 3DOSnap. would really appreciate help on this as I use it all the time to zoom to an object in MS to have it scale and position correctly in PS. thank you :) Quote
rkmcswain Posted February 3, 2021 Posted February 3, 2021 Do you have any additional keyboard shortcuts defined in any partial customization files? (that last [+].....) Quote
jt6572 Posted February 8, 2021 Author Posted February 8, 2021 hi rkmcswain, thanks very much for your reply. I do have them set in there, but dont remember putting them in (ie; I am back using autoCAD after suffering through Microstation). Interesting they are set to what I want them to be.... just a quick question if that's okay? I am correct in thinking that i will be able to press F4 to snap to an endpoint when doing a zoom window, right? Quote
tombu Posted February 8, 2021 Posted February 8, 2021 Haven't tried it but by default zoom window ignores Object Snap mode settings. You can still tell it to snap to each endpoint after starting the command but you would probably need a lisp routine to do what you want. Without seeing your macro F3 already toggles OSNAP and SHIFT+E toggles Endpoint snap. Quote
jt6572 Posted February 8, 2021 Author Posted February 8, 2021 Hi Tombu Thanks for your reply. I've used autocad for quite a few years, so no probs with understanding snap modes. A Couple of years ago since I used it, but I am sure I had the frame for a viewport set in ms and after the zoom command, pressing F4 did snap to the endpoints so the scale, position and size were perfect. Whether I am hallucinating or not, pressing F4 will always only fire the 3DOSnap command. At least if I can change the command of the funkey i will know if it will actually work or not! Quote
tombu Posted February 9, 2021 Posted February 9, 2021 Can't actually see the macro you're trying to assign to (Key Down) for F4, what is it? You could use a macro or lisp for Zoom like Zoom Window endp pausing for point selection endp If you get it working post how you did it. Quote
jt6572 Posted February 9, 2021 Author Posted February 9, 2021 Hey Tombu, I really think it is just a matter of remapping the F4 key. so first question is, why can't I overwrite the default setting! second question is: is this actually possible (zoom, snap) or have I gone prematurely senile?!! Quote
jt6572 Posted February 9, 2021 Author Posted February 9, 2021 (edited) hey Tombu, that's awesome! thanks so much - i really appreciate it. only just got in, so will try it out. I had thought that maybe just a zoom to object would work as well, as it is the viewport frame I scale and bring into model space. will report back on both soon. The shizzle: (defun c:zw () (setq pt1 (getpoint "\nSelect First Window Point: ")) (setq pt1 (osnap pt1 "_endp")) (setq pt2 (getpoint "\nSelect Second Window Point: ")) (setq pt2 (osnap pt2 "_endp")) (command "zoom" "w" pt1 pt2 ) ; end zoom (princ) ) ; end program Edited February 10, 2021 by jt6572 add outcome Quote
tombu Posted February 10, 2021 Posted February 10, 2021 12 hours ago, jt6572 said: I had thought that maybe just a zoom to object would work as well, as it is the viewport frame I scale and bring into model space. will report back on both soon. You convinced me to add it to my Zoom drop-down in my custom View panel using the default Rectangle Images. ZW is a defined shortcut for "Zoom Window" in Civil 3D so I named it "Zoom to Points" or ZPTS. Lee's code was conceptual and didn't use local variables, he suggested using CAB's version in the thread. I went with CAB's version but commented out the OSNAP lines letting "getpoint" use my OSNAP settings. (defun c:zpts (/ pt1 pt2) (if (and (setq pt1 (getpoint "\nSelect First Window Point: ")) ; (setq pt1 (osnap pt1 "_end,_app")) (setq pt2 (getpoint "\nSelect Second Window Point: ")) ; (setq pt2 (osnap pt2 "_end,_app")) ) (command "._zoom" "_w" "_non" pt1 "_non" pt2) ; end zoom ) (princ) ) Curious what you're trying to do here with the viewport frame. There are a few lisp for creating them like https://jtbworld.com/autocad-vp-outline-lsp. Are you trying to match a viewport's view on the Model tab? Saving that view and restoring it on the Model tab is easy enough and switching between multiple saved views is as simple as picking them from a drop-down. 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.