Sample Enterprise Knowledge Language (EKL) Script
// This action is checking if a Piping part is part // of a specific product // Let currentInstance (PLMCoreInstance) Let Father (PLMCoreReference) Let PipPartOcc(Piping_Pipe_Occurrence) // Let's initialize Result to False to avoid issues Result = False // We try to get the Input as a Piping Part Occurrence set PipPartOcc = Input // If PipPartOcc is NULL, it means that Input is not a Piping Part Occurrence Result = (PipPartOcc <> NULL) // We have a Piping Part Occurrence if (Result) { // Let's retrieve the instance from the occurrence set currentInstance = PipPartOcc.Instance // if we retrieved the instance then try to get the father if (currentInstance <> NULL) { set Father = currentInstance.Owner // if the father product is retrieved if (Father <> NULL) { // If the product title is "Fuel Oil Piping" then Result is true // and the action for the view update rule will be executed Result = (Father.V_Name == "Fuel Oil Piping") } } } Details of the code as follows:
The actual view update rule performing as Action (applying graphical properties, part visibility in the view, etc.) is not specified in the script. It is defined in the View Update Rule dialog box. You can define the Action in the script. |