General InformationThis rule is invoked during Generate Operations by Catalog command. Input ObjectsInputs for the rule must be of the following type: Object of type MfgProcessOccurrence Input of type List, which holds a list of Systems occurrence. Parameters corresponds to the context object. The Parameter input object has one output registered in it: ohSystemOcc, which stores the System occurrence.
SampleThe following example explains how to define the System as parent, based on the name of the input Manufactured Item and the name of the System. /* System Rule */ let hProcessRef(DELFmiFunctionReference) let hSystemOcc(ProdSystemOccurrence) let hSystemRef(DELLmiProductionSystemReference) let nbOfSystems(Integer) let ii(Integer) let jj(Integer) let sProcessDesc(String) let sSystemTitle(String) let idx(Integer) if(ihProcessOcc <> NULL) { set hProcessRef = ihProcessOcc.Reference if(hProcessRef <> NULL) { set sProcessDesc = hProcessRef->GetAttributeString("V_description") set nbOfSystems = iListOfSystems.Size() set jj = 1 for jj while jj <= nbOfSystems { set hSystemOcc = iListOfSystems.GetItem(jj) if(hSystemOcc <> NULL) { set hSystemRef = hSystemOcc.Reference set sSystemTitle = hSystemRef->GetAttributeString("V_Name") if(sSystemTitle.Length()>0 and sProcessDesc.Length()>0) { idx = sProcessDesc.Search(sSystemTitle) if(idx <> -1) { Parameters.SetAttributeObject("ohSystemOcc", hSystemOcc) set jj = nbOfSystems } } } } } else set ii = 0 } |