Business Rule: CATRule to Name the Product Created for Geometries Storage

You can use a Business Logic to name the product created for geometries storage.

This page discusses:

General Information

The Business Logic can either be added as a CATRule file or it can be defined in the DataSetup app.

If the script is created through DataSetup, it will be persistent in the database, stored on the server and available to all.

If the script created using a CATRule, it can only be executed as long as both files DELNCGeometryPart.CATRule and DELNCGeometryPart.CATRuleExit are present in ..\resources\knowledge\scripts. The files can be invoked by editing the CATRule file or by creating a new CATRule and CATRuleExit files with an Opening ID of DELNCGeometryPart_ID.

Note: The Opening ID cannot be changed.

Input Objects

You can use the attributes of a tool. Input objects must be VPMInstance.

Example of usage

  • For CATRule file:

    Let NCGeomPartInstance(VPMInstance)
    Let NCGeomPartReference(VPMReference)
    Let PartName(string)
    
    //Default Name of 3DPart
    set NCGeomPartInstance = Instance
    if (NCGeomPartInstance <> NULL)
    {
    	//Default Instance Name
    	PartName = NCGeomPartInstance.PLM_ExternalID
    	PartName = "Complementary Geometry_" + PartName
    	NCGeomPartInstance.PLM_ExternalID = PartName	
    
    	NCGeomPartReference = NCGeomPartInstance.Reference
    	if (NCGeomPartReference <> NULL)
    	{
    		//Default Reference Name
    PartName = NCGeomPartReference.V_Name
    		PartName = "Complementary Geometry_" + PartName
    		NCGeomPartReference.V_Name = PartName	
    	}
    }
    
    

  • For CATRuleExit file:

    <Scripts>
     <Script OpeningID="DELNCGeometryPart_ID" Type="VPMInstance" ScriptName=" DELNCGeometryPart" />
    </Scripts>