TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: A_LOTA_NOTA on May 08, 2008, 05:52:13 PM

Title: Lisp / Script Question
Post by: A_LOTA_NOTA on May 08, 2008, 05:52:13 PM
I have a lisp that basically just Wblocks selected items out. The user selects the items & adds the file name using DCL. I would like to be able to open the Wblock drawing that is created & have some automated stuff done in that drawing as well. However, as you know, the lisp being ran stops when the Wblock drawing is opened. I tried using a script to call the first Lisp. This lisp creates the Wblock & opens it (I don't think I can pass the DWG name to the script so I have the lisp open it). Then I tried to run the second lisp. I have never created a script before but reading on the web it looked easy. But it's like when the DCL of the first lisp opens the script dies. Do I need some sort of delay giving the user time to select the object?

I'm sure I could do all that need to be done in the drawing before the objects are wblocked out. But, if it opened the wblock drawing & did everything, the user could see that it was successful. I thought about writing to the command line the number of items blocked out but I liked it the other idea better.

Thanks for the help
Title: Re: Lisp / Script Question
Post by: T.Willey on May 08, 2008, 05:54:28 PM
Have the lisp create the new drawing, and the script.  Then have the script open the new drawing, do what needs to be done, then close the drawing.
Title: Re: Lisp / Script Question
Post by: A_LOTA_NOTA on May 08, 2008, 06:16:36 PM
Have the lisp create the new drawing, and the script.  Then have the script open the new drawing, do what needs to be done, then close the drawing.

I knew it would be a simple solution.  I'll give that a try!

Thanks for your help
Title: Re: Lisp / Script Question
Post by: T.Willey on May 08, 2008, 06:17:45 PM
Have the lisp create the new drawing, and the script.  Then have the script open the new drawing, do what needs to be done, then close the drawing.

I knew it would be a simple solution.  I'll give that a try!

Thanks for your help
You're welcome.  Let us know if you get stuck some place.

Edit:  Don't forget to have the lisp call the script.