Jump to content

running multipal scripts


mgonzales

Recommended Posts

At my Co. we have many drawings that have several xref scales in the list and i also wanted to purge all the regapps, but i wanted it to run everytime i load a drawing so here is what i did in the acaddoc.lsp

 

(setq oldfiledia (getvar "FILEDIA")) ;Save value of FileDia system variable
(setvar "FILEDIA" 0) ;Set FileDia to 0 to use command prompt only
(command "_SCRIPT" "P:\\Cad\\Script\\New Script\\scalelist.scr") ;Run the script 
(command "_SCRIPT" "F:\\Documents\\lisp\\lsp\purgereapps.scr") ;Run the script
(setvar "FILEDIA" oldfiledia) ;Set FileDia back to previous value
(setq oldfiledia nil) ;Clear variable used for FileDia

 

please help. thanks

Link to comment
Share on other sites

Scripts are a weird beast. You can only one run at once, but that's not the only thing. If you have a LISP running, the script will sort of run at the same time as the LISP, which will throw both off. Furthermore, you can't have two scripts running at once. I know, all computer code wisdom tells you "linear progression from start to finish", but that's not how it works when you have a script and a LISP or more than one script.

 

One suggestion is to put in a sort of "while loop delay," and define a variable (say, "continue_1, continue_2" and so on) at the end of your script. You can create a loop like:

 

(while (not continue_1))

Which will do absolutely nothing until "continue_1" is defined (which will only happen when your script ends), at which point the LISP will continue, and you can run your next script.

 

You could also try combining them into one script.

 

I hope that helps. ^.^

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