Jump to content

Macro on Tool Palette


xspacex

Recommended Posts

Hello,

 

I have a question about macros on tool palettes.

 

If there is a button on a tool palette with this macro:

^C^C^P(command "_AecbDuctFittingAdd" "_ty" "cross")

after using the macro, if i right click on the screen, the shortcut menu appears, and if i look under "recent input", i will be able to see this (command "_AecbDuctFittingAdd" "_ty" "cross").

I am wondering if there is a way to give the maro a name to show in the recent input list, and if not, can the macro be hidden from the recent input list?

 

Thanks.

Link to comment
Share on other sites

Create a new command using that AutoLISP statement in your acaddoc.lsp file (use the name you want):

 

(defun c:[color=blue]DuctFittingCross[/color]
(command "_AecbDuctFittingAdd" "_ty" "cross")
(princ)
)

 

and replace the macro by:

 

^C^C[color=blue]DuctFittingCross[/color]

 

This way the "name" DuctFittingCross will appear in list.

Link to comment
Share on other sites

Hi, Thanks for your response.

Is there any other way besides making a Lisp file? Is there something that can be added to the macro that will create a display name, or hide that macro code?

 

Thanks again

Link to comment
Share on other sites

Not sure that there is a way to accomplish your request - you may try to use the above as associated macro (even if is using AutoLISP also):

 

^C^C^P(defun c:DuctFittingCross (command "_AecbDuctFittingAdd" "_ty" "cross") (princ)) DuctFittingCross 

 

This way, at least, will avoid having an extra file to manage.

 

Regards,

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...