From: ··········@my-dejanews.com
Subject: Error in CLIPS
Date: 
Message-ID: <7gfl46$bs5$1@nnrp1.dejanews.com>
Hi,
Here's a bit of code I have written in CLIPS....


;
; Open the file "output.dat"
;
(defrule open_output_file (declare (salience -1))
=>
  (open "a:\output.dat" output "w"))



; ; If there is any spaceblk, write its coordinates onto the data file
output.dat to send ; to AutoCad for the graphical representation of the
spatial blocks generated within CLIPS ; (defrule write_to_file (declare
(salience -2))	(spaceblk) =>  (printout t "Coordinate values written to
output.dat successfully!" crlf)  (assert (spaceblk (blx (printout output))
(bly (printout output))  (brx (printout output)) (bry (printout output)) 
(trx (printout output)) (try (printout output))  (tlx (printout output)) (tly
(printout output)))))



For the above rule "write_to_file", I get the following error message..


[CSTRNCHK1] The function return value found in the assert command does not
match the allowed types for slot blx.

Can anyone tell me what it is that I'm doing wrong?
Thanx.
Joe

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
From: Vassil Nikolov
Subject: Re: Error in CLIPS
Date: 
Message-ID: <7gkrr4$f0c$1@nnrp1.dejanews.com>
In article <············@nnrp1.dejanews.com>,
  ··········@my-dejanews.com wrote:
(...)
>
> ; ; If there is any spaceblk, write its coordinates onto the data file
> output.dat to send ; to AutoCad for the graphical representation of the
> spatial blocks generated within CLIPS ; (defrule write_to_file (declare
> (salience -2))	(spaceblk) =>  (printout t "Coordinate values written to
> output.dat successfully!" crlf)  (assert (spaceblk (blx (printout output))
> (bly (printout output))  (brx (printout output)) (bry (printout output))
> (trx (printout output)) (try (printout output))  (tlx (printout output)) (tly
> (printout output)))))
(...)
> Can anyone tell me what it is that I'm doing wrong?

You have a much greater chance of getting a useful response if:
* you post AutoCAD-specific questions to the AutoCAD group;
* you take care to post code that hasn't lost its indentation
(I am not even talking about showing how you have tried to find
out what was wrong).

--
Vassil Nikolov <········@poboxes.com> www.poboxes.com/vnikolov
(You may want to cc your posting to me if I _have_ to see it.)
   LEGEMANVALEMFVTVTVM  (Ancient Roman programmers' adage.)

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own