Hi again Thao,

I moved the (deftemplate parameter) out of your rule and formatted your code
a bit.
Try this...

;; ========= thao.clp =======================
(clear)
(watch all)
(reset) ;; See JIA pp. 79-80 about doing a (reset) when starting a program.

(deftemplate parameter
    (multislot name )
    (multislot value)
    (multislot unit ))

(defrule inputParameterSpannungsnachweis
    (nachweis "Spannungsnachweis")
    =>
    (import java.lang.*)
    (bind ?querschnitt "Querschnitt")
    (bind ?Fx "Fx")
    (bind ?Fy "Fy")
    (bind ?My "My")
    (bind ?querschnittValue (new java.lang.String "I120"))
    (bind ?FxValue (new java.lang.Double 150.0 ))
    (bind ?FyValue (new java.lang.Double 200.0 ))
    (bind ?MyValue (new java.lang.Double 200.0 ))
    (bind ?querschnittsUnit "")
    (bind ?FxUnit "KN")
    (bind ?FyUnit "KN")
    (bind ?MyUnit "KNcm")
    (bind ?x (assert (parameter (name  ?querschnitt ?Fx ?Fy ?My)
                (value ?querschnittValue ?FxValue ?FyValue ?MyValue)
                (unit ?querschnittsUnit ?FxUnit ?FyUnit ?MyUnit)))))

(assert (nachweis "Spannungsnachweis"))
(run)
;; ================================

. and I got this output

 ==> Focus MAIN
 ==> f-0 (MAIN::initial-fact)
MAIN::inputParameterSpannungsnachweis: +1+1+1+1+t
 ==> f-1 (MAIN::nachweis "Spannungsnachweis")
==> Activation: MAIN::inputParameterSpannungsnachweis :  f-1
FIRE 1 MAIN::inputParameterSpannungsnachweis f-1
 ==> f-2 (MAIN::parameter (name "Querschnitt" "Fx" "Fy" "My")
     (value <External-Address:java.lang.String>
            <External-Address:java.lang.Double>
            <External-Address:java.lang.Double>
            <External-Address:java.lang.Double>)
           (unit "" "KN" "KN" "KNcm"))
 <== Focus MAIN

Is this what you wanted?

Cheers,
Jason
------------------------

Jason Morris
Morris Technical Solutions
[EMAIL PROTECTED]
www.morristechnicalsolutions.com
fax/phone: 503.692.1088





--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to