CAD_Question Posted March 11, 2018 Posted March 11, 2018 Hi, I'm hoping that someone can help me with a macro that I'm trying to complete. I'm making a a custom toolbar with custom valve buttons that I can insert and rotate. Please see the macro below: ^C^C (command "insert" "C:\drafting\Ball Valve" "s" "1" pause pause) when I click on the custom button it directs me to the CUI (obviously not what I wanted haha). All I want to do is click the button and have the valve populate in my drawing space ready to pick a point and rotate the valve. I pieced together this macro from a few posts and I should add that I have very little knowledge with macros and lisp routines (if this is needed). Also I do not want to use tool pallettes so please no comments on this, I prefer toolbars in Autocad. Thanks in advance for any help you can offer. Quote
RBCad Posted March 12, 2018 Posted March 12, 2018 I don't have a way to test these right now but something like the following may work: ^C^C_insert;"Ball Valve";\;;;Rotate;last;; Or ^C^C_insert;"C:\\drafting\\Ball Valve";\;;;Rotate;last;; In either case, you probably have to add the block path (C:\drafting) to the "Working Support File Search Path" If it doesn't work, look at the command line to see where it fails. Quote
BIGAL Posted March 12, 2018 Posted March 12, 2018 Try this slight variation. The -insert stops the dialouge from appearing. ^C^C (command "-insert" "C:\\drafting\\Ball Valve" (getpoint) "1" "1" pause) Quote
CAD_Question Posted March 12, 2018 Author Posted March 12, 2018 It worked perfectly! Thank you very much! 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.