Hi Jim, You can get the deftemplate of the fact by using fact.getDeftemplate() and then get the name of the deftemplate using deftemplate.getName().
-sanket. ------------------------------------------------------------------------------- Sanket D. Choksey, Research Assistant, AI Lab, FL 312, C.S. Dept.,WPI, Worcester MA 01609 USA. Tel:(O) 508-831-5006 [EMAIL PROTECTED] http://www.cs.wpi.edu/~sanket ------------------------------------------------------------------------------- On Thu, 11 Sep 2003, Jim VanDragt wrote: > I want to write a function that needs to find a fact by name. For example > I need to find the fact "MAIN::work-surface" and evaluate it's slot > values. Is there a way to search through all the facts to find a certain > one? > > f-0 (MAIN::initial-fact) > f-1 (MAIN::vocabulary (product work-surface)) > f-2 (MAIN::work-surface (shape rectangular) (product-line 2) > (depth 24) (width 62) (order-string "Z2R,BUL,G4,62,24E,1X,CO,ED") > (shape-code R) (top-material L) (top-finish 1X) (top-finish-entered > not-defined) (front-edge E) (front-edge-finish ED) (side-edge not-defined) > (side-edge-finish CO) (secondary-finish BU) (b ack-edge-cord-drop G4) > (support-type not-defined)) > For a total of 3 facts. > > TIA > > Jim Van Dragt > Herman Miller Inc. > (616) 654-5285 > > -------------------------------------------------------------------- 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] --------------------------------------------------------------------
