Jump to content
CAD_Question

CUI file/Macro Not Working

Recommended Posts

CAD_Question

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.

Share this post


Link to post
Share on other sites
RBCad

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.

Share this post


Link to post
Share on other sites
BIGAL

Try this slight variation. The -insert stops the dialouge from appearing.

 

^C^C (command "-insert" "C:\\drafting\\Ball Valve" (getpoint) "1" "1" pause)

Share this post


Link to post
Share on other sites
CAD_Question

It worked perfectly! Thank you very much!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×