Jump to content

vlax-add/remove-cmd


flowerrobot

Recommended Posts

hey guys

 

Im having a bit of truble with those two commands.

 

Simply im finding that if i load it into one drawing1, then load in into drawing2, drawing 1 will lose its command and return

; error: Visual LISP command document mismatch: hi

 

The reason im using it is because when it come to re-defineing commands i thought this would be easyer

Here is an example where its inbeded in a Foreach function of each function

and where NewKeyList is a list of what the are to be defined as

(vlax-remove-cmd (cadr nm))
   (if NewKeyList 
    (progn      
     (setenv (car nm) (nth Int_Count NewKeyList))
     (setq Int_Count (1+ Int_Count))))
   (eval (read (strcat "(vlax-add-cmd \""(getenv (car nm)) "\" '" (caddr nm)")"))) 

 

thanks for any input

 

flower

Link to comment
Share on other sites

hey guys

 

Im having a bit of truble with those two commands.

 

Simply im finding that if i load it into one drawing1, then load in into drawing2, drawing 1 will lose its command and return

 

 

The reason im using it is because when it come to re-defineing commands i thought this would be easyer

Here is an example where its inbeded in a Foreach function of each function

and where NewKeyList is a list of what the are to be defined as

(vlax-remove-cmd (cadr nm))
   (if NewKeyList 
    (progn      
     (setenv (car nm) (nth Int_Count NewKeyList))
     (setq Int_Count (1+ Int_Count))))
   (eval (read (strcat "(vlax-add-cmd \""(getenv (car nm)) "\" '" (caddr nm)")"))) 

 

thanks for any input

 

flower

 

 

Could you not use for example:

 

 
(if (not c:fillet) (command "._UNDEFINE" "_FILLET"))

 

then put same command name for your lisp routine.

(defun c:fillet ()

.

.

....etc

Link to comment
Share on other sites

(Setq c:hi nil)

when i press hi returns

; error: no function definition: C:HI

 

Could you explan this vl-load-all call

since every thing is in a .vlx

 

Aswell i would like it to transfer threw open doc's if possible

 

Cheers Flower

Link to comment
Share on other sites

  • 2 weeks later...

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