Jump to content

CUI file/Macro Not Working


CAD_Question

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...