Jump to content

setting variables in DIESEL macro???


Recommended Posts

Guest looseLISPSsinkSHIPS
Posted

Hi I have the following lisp, which I constructed to temporarily reset the OSMODE variable whilst a function is executed, however because of the circumstance I need this type of function but using a DEISEL macro…

 

DEISEL macros aren’t my strong point, could somebody assist in this

 

 

CODE STARTS HERE

 

(defun C:Max ( )

 

(setq temperr *error*)

(setq *error* trap1)

 

(setq ERRORSNAP (getvar "osmode"))

 

(setq MYSNAP (getvar "osmode"))

(command "osmode" "4241")

(command "wood")

(while (= (logand (getvar "cmdactive") 1) 1)

(command pause)

)

(setvar "osmode" MYSNAP)

)

 

(defun trap1 (errmsg)

 

(setvar "osmode" ERRORSNAP)

 

(setq *error* temperr)

 

(princ "\nFunctie Geannuleerd... ")

(terpri)

(prompt errmsg)

(princ)

)

 

CODE ENDS HERE

 

Also if error handling is not possible within DEISEL macros then I will settle for one without.

 

Thanks-

Posted
Here is a DIESEL reference, but I don't think you can have a while in DIESEL... I hope I am mistaken. :wink:

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