Jump to content

Problem to run several scripts from Lisp


Recommended Posts

Posted

I have problem to run several scrips from Autolisp. It only run the last script. How to do?

 

If I choose "str_s2" and "med_pan" I want script "DUe_stativL3.scr" and "HTKM001.scr" to insert blocks, but it only insert "HTKM001.scr".

 

(if(= ddiag 2)

(progn

(if (= mychoice "str_s2")(setq a "1")(setq b 0))

(if (= mychoice "str_m2")(setq a "2")(setq b 0))

(if (= mychoice "str_l2")(command "_.script" "T:\\DUE\\Dimritning\\L3\\script\\DUe_stativL3.scr")(setq b 0))

(command)

(if (= mychoice "str_s3")(setq a "4")(setq b 0))

(if (= mychoice "str_m3")(setq a "5")(setq b 0))

(if (= mychoice "str_l3")(setq a "6")(setq b 0))

(if (= mypan "ej_pan")(setq c "1")(setq d 0))

(if (= mypan "med_pan")(command "_.script" "T:\\DUE\\Hydraulschema\\script\\HTKM001.scr")(setq d 0))

(if (= mypan "med_ljudo")(setq c "3")(setq d 0))

(if (= mypump1 1)(setq e "1")(setq e "2"))

(if (= myspider1 1)(setq e "1")(setq e "2"))

(if (= myspider2 1)(setq f "1")(setq f "2"))

 

/Dan

DUe_stativL3.scr

Posted

If you choose "str_s2" ==> (if (= mychoice "str_s2")(setq a "1")(setq b 0))

 

If I choose "str_l2" ====> (if (= mychoice "str_l2")(command "_.script" "T:\\DUE\\Dimritning\\L3\\script\\DUe_stativL3.scr ")(setq b 0))

 

"str_l2" run script and not "str_s2"

 

OK.

Posted

SLW get's angry when you don't use

 in your posts... You wouldn't like him when he's angry.

Posted

do you need to run scripts?

can you get rid of the scripts and write them into the lisp code?

Posted

Thank you JohnM. It worked without the script. Thank you other to.

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