From: Mike Kinner
Subject: Calling a another routine
Date: 
Message-ID: <boraei$1mh7$1@news.fsr.net>
As part of a larger lisp routine I am trying to call flatten.lsp (from
Express Tools).  If I use (C:FLATTEN) it launches but needs user input
responses ALL & NO, and I want those responses automated.  I potentially I
have 3 options:

1 - Modify flatten.lsp to include my desired responses.  I've tried but my
lisp foo is weak.
2 - If possible, call flatten.lsp but don't wait until complete, then I
could include my repsonses in my main lisp routine such as
(C:FLATTEN)(command "ALL" "" "NO").
3 - If possible, pass my desired repsonses as variables when calling
flatten.lsp.

Any suggestions?  I'm a lisp newbie so please type slowly.  Thanks.

Mike

From: Mike Kinner
Subject: Re: Calling a another routine
Date: 
Message-ID: <borhbs$1q8r$1@news.fsr.net>
I am using Lisp for AutoCAD... sorry, I didn't realize Lisp was anything but
a subroutine for AutoCAD.  Thanks anyways.

Mike

"Mike Kinner" <···@kinner.com> wrote in message
··················@news.fsr.net...
> As part of a larger lisp routine I am trying to call flatten.lsp (from
> Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> responses ALL & NO, and I want those responses automated.  I potentially I
> have 3 options:
>
> 1 - Modify flatten.lsp to include my desired responses.  I've tried but my
> lisp foo is weak.
> 2 - If possible, call flatten.lsp but don't wait until complete, then I
> could include my repsonses in my main lisp routine such as
> (C:FLATTEN)(command "ALL" "" "NO").
> 3 - If possible, pass my desired repsonses as variables when calling
> flatten.lsp.
>
> Any suggestions?  I'm a lisp newbie so please type slowly.  Thanks.
>
> Mike
>
>
>
From: Coby Beck
Subject: Re: Calling a another routine
Date: 
Message-ID: <bosdhj$1puj$1@otis.netspace.net.au>
"Mike Kinner" <···@kinner.com> wrote in message
··················@news.fsr.net...
> I am using Lisp for AutoCAD... sorry, I didn't realize Lisp was anything
but
> a subroutine for AutoCAD.  Thanks anyways.
>

Ouch!  that hurts....
:)

-- 
Coby Beck
(remove #\Space "coby 101 @ big pond . com")
From: Thomas F. Burdick
Subject: Re: Calling a another routine
Date: 
Message-ID: <xcv4qx95spi.fsf@famine.OCF.Berkeley.EDU>
"Coby Beck" <·····@mercury.bc.ca> writes:

> "Mike Kinner" <···@kinner.com> wrote in message
> ··················@news.fsr.net...
> > I am using Lisp for AutoCAD... sorry, I didn't realize Lisp was anything
> but
> > a subroutine for AutoCAD.  Thanks anyways.
> >
> 
> Ouch!  that hurts....
> :)

Oh, don't take it so hard, we all knew from the beginning that this
was just gonna be a 50 year flash in the pan.  So, what should we all
do next, when the flash is over in a few years?

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Joe Marshall
Subject: Re: Calling a another routine
Date: 
Message-ID: <fzgtgz6o.fsf@ccs.neu.edu>
···@famine.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> "Coby Beck" <·····@mercury.bc.ca> writes:
>
>> "Mike Kinner" <···@kinner.com> wrote in message
>> ··················@news.fsr.net...
>> > I am using Lisp for AutoCAD... sorry, I didn't realize Lisp was anything
>> but
>> > a subroutine for AutoCAD.  Thanks anyways.
>> >
>> 
>> Ouch!  that hurts....
>> :)
>
> Oh, don't take it so hard, we all knew from the beginning that this
> was just gonna be a 50 year flash in the pan.  So, what should we all
> do next, when the flash is over in a few years?

Add static typing to Perl?
From: Kenny Tilton
Subject: Re: Calling a another routine
Date: 
Message-ID: <Rxrsb.152231$pT1.90661@twister.nyc.rr.com>
Coby Beck wrote:
> "Mike Kinner" <···@kinner.com> wrote in message
> ··················@news.fsr.net...
> 
>>I am using Lisp for AutoCAD... sorry, I didn't realize Lisp was anything
> 
> but
> 
>>a subroutine for AutoCAD.  Thanks anyways.
>>
> 
> 
> Ouch!  that hurts....

That's OK. I thought AutoCad was an option to the LOOP macro. The 
camelCase should have been a clue, I guess.

kenny

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Barry Margolin
Subject: Re: Calling a another routine
Date: 
Message-ID: <Mgasb.455$lK3.256@news.level3.com>
In article <·············@news.fsr.net>, Mike Kinner <···@kinner.com> wrote:
>As part of a larger lisp routine I am trying to call flatten.lsp (from
>Express Tools).  If I use (C:FLATTEN) it launches but needs user input
>responses ALL & NO, and I want those responses automated.  I potentially I
>have 3 options:
>
>1 - Modify flatten.lsp to include my desired responses.  I've tried but my
>lisp foo is weak.
>2 - If possible, call flatten.lsp but don't wait until complete, then I
>could include my repsonses in my main lisp routine such as
>(C:FLATTEN)(command "ALL" "" "NO").
>3 - If possible, pass my desired repsonses as variables when calling
>flatten.lsp.

Check whether the tool set already includes a function that takes
parameters rather than prompting the user.  But if not, you should be able
to do something like:

(with-input-from-string (*query-io* "ALL
NO
")
  (c:flatten))

-- 
Barry Margolin, ··············@level3.com
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
From: Mike Kinner
Subject: Re: Calling a another routine
Date: 
Message-ID: <boree2$1onh$1@news.fsr.net>
"Barry Margolin" <··············@level3.com> wrote in message
······················@news.level3.com...
> In article <·············@news.fsr.net>, Mike Kinner <···@kinner.com>
wrote:
> >As part of a larger lisp routine I am trying to call flatten.lsp (from
> >Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> >responses ALL & NO, and I want those responses automated.  I potentially
I
> >have 3 options:
> >
> >1 - Modify flatten.lsp to include my desired responses.  I've tried but
my
> >lisp foo is weak.
> >2 - If possible, call flatten.lsp but don't wait until complete, then I
> >could include my repsonses in my main lisp routine such as
> >(C:FLATTEN)(command "ALL" "" "NO").
> >3 - If possible, pass my desired repsonses as variables when calling
> >flatten.lsp.
>
> Check whether the tool set already includes a function that takes
> parameters rather than prompting the user.  But if not, you should be able
> to do something like:
>
> (with-input-from-string (*query-io* "ALL
> NO
> ")
>   (c:flatten))
>
> -- 
> Barry Margolin, ··············@level3.com
> Level(3), Woburn, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to the
group.

Barry,

When I try the code you posted I receive the following error:

error: no function definition: *QUERY-IO*

Any suggestions?

Thanks for your help!

Mike
From: Geoffrey Summerhayes
Subject: Re: Calling a another routine
Date: 
Message-ID: <J2bsb.3721$xI2.221817@news20.bellglobal.com>
"Barry Margolin" <··············@level3.com> wrote in message
······················@news.level3.com...
> In article <·············@news.fsr.net>, Mike Kinner <···@kinner.com>
wrote:
> >As part of a larger lisp routine I am trying to call flatten.lsp (from
> >Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> >responses ALL & NO, and I want those responses automated.  I potentially
I
> >have 3 options:
> >
> >1 - Modify flatten.lsp to include my desired responses.  I've tried but
my
> >lisp foo is weak.
> >2 - If possible, call flatten.lsp but don't wait until complete, then I
> >could include my repsonses in my main lisp routine such as
> >(C:FLATTEN)(command "ALL" "" "NO").
> >3 - If possible, pass my desired repsonses as variables when calling
> >flatten.lsp.
>
> Check whether the tool set already includes a function that takes
> parameters rather than prompting the user.  But if not, you should be able
> to do something like:
>
> (with-input-from-string (*query-io* "ALL
> NO
> ")
>   (c:flatten))
>

I don't know whether this will work. From the sounds of it, he's
talking AutoCAD, not Common Lisp. I'm not well enough acquainted
with the language to tell if AutoLisp has the symbols to use your
solution.

To the OP, we usually have a couple of readers who do use AutoLisp,
if that's what you're using. If the code's short enough, and it won't
cause legal entanglements, perhaps you could post it or post a link to
the original site of the code and something may suggest itself. There
are a couple of autocad NG's as well, comp.cad.autocad for example.

Is there a decent on-line reference for AutoLisp? There's a fair amount
of code snippets and book titles but I don't see any for a function/symbol
reference.

--
Geoff
From: Pascal Bourguignon
Subject: Re: Calling a another routine
Date: 
Message-ID: <87ad72ka1r.fsf@thalassa.informatimago.com>
"Mike Kinner" <···@kinner.com> writes:

> As part of a larger lisp routine I am trying to call flatten.lsp (from
> Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> responses ALL & NO, and I want those responses automated.  I potentially I
> have 3 options:
> 
> 1 - Modify flatten.lsp to include my desired responses.  I've tried but my
> lisp foo is weak.
> 2 - If possible, call flatten.lsp but don't wait until complete, then I
> could include my repsonses in my main lisp routine such as
> (C:FLATTEN)(command "ALL" "" "NO").
> 3 - If possible, pass my desired repsonses as variables when calling
> flatten.lsp.
> 
> Any suggestions?  I'm a lisp newbie so please type slowly.  Thanks.


Look at  the source to  see what stream  it reads the  responses from.
Then, assuming it's *standard-input* (but it could be *terminal-io* or
*query-io* for example):

(let ((*standard-input* (make-string-input-stream 
                         (format nil "~{~A~%~}" '("ALL" "" "NO")))))
     (C:FLATTEN))

-- 
__Pascal_Bourguignon__
http://www.informatimago.com/
From: Mike Kinner
Subject: Re: Calling a another routine
Date: 
Message-ID: <borebt$1onf$1@news.fsr.net>
"Pascal Bourguignon" <····@thalassa.informatimago.com> wrote in message
···················@thalassa.informatimago.com...
> "Mike Kinner" <···@kinner.com> writes:
>
> > As part of a larger lisp routine I am trying to call flatten.lsp (from
> > Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> > responses ALL & NO, and I want those responses automated.  I potentially
I
> > have 3 options:
> >
> > 1 - Modify flatten.lsp to include my desired responses.  I've tried but
my
> > lisp foo is weak.
> > 2 - If possible, call flatten.lsp but don't wait until complete, then I
> > could include my repsonses in my main lisp routine such as
> > (C:FLATTEN)(command "ALL" "" "NO").
> > 3 - If possible, pass my desired repsonses as variables when calling
> > flatten.lsp.
> >
> > Any suggestions?  I'm a lisp newbie so please type slowly.  Thanks.
>
>
> Look at  the source to  see what stream  it reads the  responses from.
> Then, assuming it's *standard-input* (but it could be *terminal-io* or
> *query-io* for example):
>
> (let ((*standard-input* (make-string-input-stream
>                          (format nil "~{~A~%~}" '("ALL" "" "NO")))))
>      (C:FLATTEN))
>
> -- 
> __Pascal_Bourguignon__
> http://www.informatimago.com/

Pascal,

How do I see what stream  it reads the  responses from by looking at
flatten.lsp?  I tried the code you posted using *standard-input*,
*terminal-io* and *query-io* and I always receive the following error:

error: no function definition: FORMAT

Any suggestions?

Thanks for your help!

Mike
From: Peter Seibel
Subject: Re: Calling a another routine
Date: 
Message-ID: <m33ccuwu64.fsf@javamonkey.com>
"Mike Kinner" <···@kinner.com> writes:

> "Pascal Bourguignon" <····@thalassa.informatimago.com> wrote in message
> ···················@thalassa.informatimago.com...
> > "Mike Kinner" <···@kinner.com> writes:
> >
> > > As part of a larger lisp routine I am trying to call flatten.lsp (from
> > > Express Tools).  If I use (C:FLATTEN) it launches but needs user input
> > > responses ALL & NO, and I want those responses automated.  I potentially
> I
> > > have 3 options:
> > >
> > > 1 - Modify flatten.lsp to include my desired responses.  I've tried but
> my
> > > lisp foo is weak.
> > > 2 - If possible, call flatten.lsp but don't wait until complete, then I
> > > could include my repsonses in my main lisp routine such as
> > > (C:FLATTEN)(command "ALL" "" "NO").
> > > 3 - If possible, pass my desired repsonses as variables when calling
> > > flatten.lsp.
> > >
> > > Any suggestions?  I'm a lisp newbie so please type slowly.  Thanks.
> >
> >
> > Look at  the source to  see what stream  it reads the  responses from.
> > Then, assuming it's *standard-input* (but it could be *terminal-io* or
> > *query-io* for example):
> >
> > (let ((*standard-input* (make-string-input-stream
> >                          (format nil "~{~A~%~}" '("ALL" "" "NO")))))
> >      (C:FLATTEN))
> >
> > -- 
> > __Pascal_Bourguignon__
> > http://www.informatimago.com/
> 
> Pascal,
> 
> How do I see what stream  it reads the  responses from by looking at
> flatten.lsp?  I tried the code you posted using *standard-input*,
> *terminal-io* and *query-io* and I always receive the following error:
> 
> error: no function definition: FORMAT
> 
> Any suggestions?

Mike, are you using Common Lisp? Based on a quick google of lisp and
"express tools" I suspect you're using AutoLisp, the Lisp dialect used
to customize AutoCAD. If so, the answers you get here are not likely
to be helpful as this group is largely focused on Common Lisp. You
might have better luck in comp.cad.autocad or somethere the AutoCAD
wizards hang out.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp