Compute the List of Additional Specification to be used depending of the context (CATPiping_OP_AddedSpecsAndResourceFilteringParams)

An opening ID is an entry point used to customize business logic. CATPiping_OP_AddedSpecsAndResourceFilteringParams allows you to get the list of additional specifications to be used depending on the context.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked during the following commands:

  • Part Place
  • Automatic Detail Design
  • Comply with Spec
  • Create Spool
  • Manage Parametric Port
  • Propagate Size
  • Edit Fabrication End Style
  • Create Route
  • Manage Branch Port
  • Insulation
  • Logical To Physical
  • Automatic Part Place
  • Value Attributes
  • Value Context

This opening ID is used to determine which additional specification is to be used to filter the part subtypes.

DefinitionDescription
PLM Opening ID

CATPiping_OP_AddedSpecsAndResourceFilteringParams

Customization intent Computation
Execution contextClient

Input Objects

Input objects must be of the following types:

  • ThisObject: feature
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters

Parameter NameTypeRead or WriteComments
ApplicativeOperationNameStringReadName of the applicative operation
SearchedTypeString ReadType of searched table or filter
FeaturePLMAttributesFilteringSearchedResourceFeatureRead
FeaturePLMAttributesFilteringSearchedPLMPartsFeatureRead
FeatureCurrentApplicativeInformationFeatureRead
ListCurrentApplicativeEntitiesKeysListRead
ListCurrentApplicativeEntitiesListRead
ListCurrentEnsSpecificationsListRead
ListAuthorizedAdditionalEnsSpecificationsListRead
ListIndexesOfRequestedAdditionalEnsSpecificationsListWrite
ListAuthorizedAdditionalEnsSpecificationsCriteriaValuesListRead
ListIndexesOfAddedEnsSpecificationsListWrite
FeatureAddedPLMAttributesFilteringSearchedResourceFeatureWrite
FeatureAddedPLMAttributesFilteringSearchedPLMPartsFeatureWrite

Sample

The following sample describes the business logic:

/* Rule created by YRJ 6/9/2015 */
/* CATRule signature (do not edit) : (ThisObject : #In BL_AddedSpecsAndResourceFilteringParams, Parameters : #In RuleContext) : #Void */

/* Inputs */ 

let FeatureCurrentApplicativeInformation (Feature)

/* Declarations for current applicative entities */
let ListCurrentApplicativeEntitiesKeys (List)
let sCurrentApplicativeEntityKey (String)
let ListCurrentApplicativeEntities (List)
let NbCurrentApplicativeEntities (Integer)
let pCurrentApplicativeEntity (PLMEntity)
let sCurrentApplicativeEntityName (String)

/* Declarations for current ens specifications & content */
let ListCurrentEnsSpecifications (List)
let NbCurrentEnsSpecifications (Integer)

/* Declarations for additional customer ens specifications */
let ListAuthorizedAdditionalEnsSpecifications (List)
let NbAuthorizedAdditionalEnsSpecifications (Integer)
let pAuthorizedAdditionalEnsSpecification (PLMEntity)
let sAuthorizedAdditionalEnsSpecificationName1 (String)
let sAuthorizedAdditionalEnsSpecificationName2 (String)


/* Declarations for BL Outputs : additional PLM attributes to filter searched resource AND/OR indexes of customer additional ens specifications to filter searched resource */ 
let FeatureAddedPLMAttributesFilteringSearchedResource (Feature)
let ListIndexesOfAddedEnsSpecifications (List)                      

let i (Integer)
let j (Integer)
let posX(Real)
let posY(Real)
let posZ(Real)
let pos(Real)

/************ Get input parameters : ListCurrentApplicativeEntities ****************/
ListCurrentApplicativeEntitiesKeys = Parameters->GetAttributeObject("ListCurrentApplicativeEntitiesKeys")
ListCurrentApplicativeEntities = Parameters->GetAttributeObject("ListCurrentApplicativeEntities")
NbCurrentApplicativeEntities = ListCurrentApplicativeEntities.Size()
Trace(1,"Eng Spec Rule : BL_AddedSpecsAndResourceFilteringParams : NbCurrentApplicativeEntities = ", NbCurrentApplicativeEntities)
i = 1
if (0 < NbCurrentApplicativeEntities)
{
   for i while i <= NbCurrentApplicativeEntities
   {
	   set sCurrentApplicativeEntityKey = ListCurrentApplicativeEntitiesKeys.GetItem(i)
	   set pCurrentApplicativeEntity = ListCurrentApplicativeEntities.GetItem(i)
	   if (NULL <> pCurrentApplicativeEntity)
	   {
	      sCurrentApplicativeEntityName = pCurrentApplicativeEntity.V_Name  /* Title */	 				   
	   }
   }		     
} 

set FeatureCurrentApplicativeInformation = Parameters->GetAttributeObject("FeatureCurrentApplicativeInformation") 
posX = FeatureCurrentApplicativeInformation->GetAttributeReal("Location_PosX")
	
posY = FeatureCurrentApplicativeInformation->GetAttributeReal("Location_PosY")
	
posZ = FeatureCurrentApplicativeInformation->GetAttributeReal("Location_PosZ")

/************ Get input parameters : ListCurrentEnsSpecifications ****************/
ListCurrentEnsSpecifications = Parameters->GetAttributeObject("ListCurrentEnsSpecifications")
NbCurrentEnsSpecifications = ListCurrentEnsSpecifications.Size()
i = 1

/************ Get input parameters : ListAuthorizedAdditionalEnsSpecifications ****************/
ListAuthorizedAdditionalEnsSpecifications = Parameters->GetAttributeObject("ListAuthorizedAdditionalEnsSpecifications")
NbAuthorizedAdditionalEnsSpecifications = ListAuthorizedAdditionalEnsSpecifications.Size()


if (0 < NbAuthorizedAdditionalEnsSpecifications)
{
 
	   set pAuthorizedAdditionalEnsSpecification = ListAuthorizedAdditionalEnsSpecifications.GetItem(1)
	   if (NULL <> pAuthorizedAdditionalEnsSpecification)
	   {
	      sAuthorizedAdditionalEnsSpecificationName1 = pAuthorizedAdditionalEnsSpecification.V_Name  /* Title */	  	   			   
	   }
	  set pAuthorizedAdditionalEnsSpecification = ListAuthorizedAdditionalEnsSpecifications.GetItem(2)
	   if (NULL <> pAuthorizedAdditionalEnsSpecification)
	   {
	      sAuthorizedAdditionalEnsSpecificationName2 = pAuthorizedAdditionalEnsSpecification.V_Name  /* Title */	  	   			   
	   }

} 

/* **************************** Fill outputs : "ListIndexesOfAddedEnsSpecifications" and "FeatureAddedPLMAttributesFilteringSearchedResource" ***************************************** */ 
if (true == Parameters.HasAttribute("ListIndexesOfAddedEnsSpecifications") and true == Parameters.HasAttribute("FeatureAddedPLMAttributesFilteringSearchedResource"))

{             
	  set ListIndexesOfAddedEnsSpecifications = Parameters->GetAttributeObject("ListIndexesOfAddedEnsSpecifications") /* List of int being the indexes of additional ens specs to consider */

if( (1000 >= posX) AND (1000 >= posY) AND (1000 >= posZ) )
{
	  ListIndexesOfAddedEnsSpecifications->Append(1) 
}
else
{
	ListIndexesOfAddedEnsSpecifications->Append(2) 
}
	  Parameters->SetAttributeObject("ListIndexesOfAddedEnsSpecifications", ListIndexesOfAddedEnsSpecifications)

	/* Fill added PLM attributes filtering searched resource */	
	set FeatureAddedPLMAttributesFilteringSearchedResource = Parameters->GetAttributeObject("FeatureAddedPLMAttributesFilteringSearchedResource") /* Feature carrying N attributes */