[Next] [Previous] [Up] [Top]

4.2.4 CONFIGURATION

4.2.4.5 The "Retrieved_Material" Hypothesis

This hypothesis retrieves all the information pertinent to the material specified in the Session.material_id slot. The material_id of Session is that of the part object.

Databases involved in the retrieval of material information objects and their property values are outlined in Table 8.

Table 8 Material Databases


data file name columns

mat_specs.nxpdb material id, color code, plastic code, description.

spgr.nxpdb material id, specific gravity.

plas_specs.nxp db plastic code, parameters (shrink, draft_min, etc.)

Figure 33 illustrates the rule that retrieves material information. The following outlines the steps taken by the LHS of the rule:

1. Ensure that there is a value within the Session.material_id slot.
2. Retrieve from the data file "mat_specs.nxpdb" all the information corresponding to the material_id. Create a new object under the MATERIAL class representing this material, prefixed by the letters 'mg'.
3. Retrieve specific gravity information for the material from the file "spgr.nxpdb".
4. Create an object under the PLASTIC class corresponding to the material object's plastic code name.
5. Attach the material object as a child to the plastic object.
6. Retrieve from the data file "plas_specs.nxpdb" information such as shrink coefficient and minimal draft and place in the plastic object.

Figure 33 Rule "Retrieved_Material"

(@RULE= R12

(@LHS= (<> (Session.material_id) (""))

(Retrieve ("mat_specs.nxpdb") (@TYPE=NXPDB;@FILL=ADD;@FWRD=FALSE;@NAME="'mg'!mat_id!";\ @CREATE=|MATERIAL|;@PROPS=material_id,plastic_id,\ material_description,material_color_code;\ @FIELDS="mat_id","plas_id","desc","col_code";\ @QUERY="mat_id like \"@V(Session.material_id)\"";\ ))

(Retrieve ("spgr.nxpdb") (@TYPE=NXPDB;@FWRD=FALSE;@NAME="'mg'!mat_id!";\ @PROPS=plastic_specific_gravity;@FIELDS="grav";\ @ATOMS=<|MATERIAL|>;)) (<> (Session.plastic_name) (""))

(CreateObject (\Session.plastic_name\) (|PLASTIC|))

(CreateObject (\Session.material_name\) (\Session.plastic_name\))

(Retrieve ("plas_specs.nxpdb") (@TYPE=NXPDB;@FWRD=FALSE;@NAME="!plas_id!'_'!mode!";\ @PROPS=plastic_id,plastic_size_mode,plastic_shrink_coefficient,\ plastic_draft_min;@FIELDS="plas_id","mode",\ "shrink","d_min";)) )

(@HYPO= Retrieved_Material) )

[Next] [Previous] [Up] [Top]