Jump to content

Custom command icon not shown at the command prompt when command is running


Recommended Posts

I've created a new command SPLEDIT and toolbar button with icon. It shows and working properly:

image.png.35d57c85ebc9719fd7508e99b7392066.png

 

However it doesn't show my icon at the command prompt when command is running:

image.png.70191781c1fc7719e86e25553b46478b.png

 

If I register my command via (vlax-add-cmd "spledit" 'sple) then it shows the icon at command prompt, but it fails to load/register the command when opened another drawing.

 

Also, note, the SPLE command is also has a toolbar button and icon of the SPLEDIT but for some reason it doesn't even show the icon in the suggested list.

 

Am I doing something wrong here?

Link to comment
Share on other sites

It's possible that you need to set the command flag ACRX-CMD-TRANSPARENT for vlax-add-cmd to be able to run it in multiple windows, especially if a command is running in another window. See this page.

 

Not so sure about the icon for SPLE, it may be because it's not considered a "real" AutoCAD command. Have you saved the workspace that includes it?

Link to comment
Share on other sites

Interesting... why wouldn't it consider it as "real" command?

They both are registered as:

(DEFUN c:spledit (/)
    (c:sple)
    (PRINC)
)

(DEFUN c:sple (/)
	(princ)
)

 

ACRX-CMD-TRANSPARENT doesn't seem to have any effect:

(vlax-add-cmd "spledit" 'sple "spledit" 1)

It works with first opened file, but btill getting 

Quote

Command: spledit ; error: Visual LISP command document mismatch: spledit

 

when open another file in the same window.

(note, that when I use vlax-add-cmd I remove C: from function names)

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