Business Rule to Define the Format and the Text of Choreography Text Events

Introduction

This document intended to provide a detailed guide and examples on how to write Business Rule to Define the Format and the Text of Choreography Text Events

Version – Validated on 2025x FD01 (FP)

Pre-requisites: User must be assigned with Owner Role or Administrator role

Licenses –

  • CSV (Collaborative Industry Innovator)
  • NSR (NC Shop Floor Programmer)

Disclaimer: Licenses mentioned above are as per 2025x documentation.

Below video demonstrates the Generation of Choreography Text Events and its result visible during Toolpath Simulation.

 

Logical Flow

Overall Process Logical Flow
Business Rule Script Logical Flow

Example Business Rule

DELNCChoreographyGeneration.txt

Detail Explanation

When we launch the "Generate Choreography Text Events", the Text Event is created automatically for all the Machining Operations under Machining Program. To create these Text Events, Business Rule is able to read the information available on the Machining Operation, the Tool associated to it etc. and display it in the form of a Text Note that will be superposed on the display when the simulation is run. It is also possible to set the format of text that will appear when running the Toolpath Simulation. 

First the Input Manufacturing Operation is fetched from the Parameters Argument to the Business Rule

/* INPUT */
Set Activity = Parameters->GetAttributeObject("MachiningOperation")

Check whether the input manufacturing operation supports the Machining operation type

if (true == Activity.IsSupporting("MachiningOperation"))

Get the Tools Information 

The information is converted in text line, and it is added to the Output Text List.

// Tool number
TextLine = "Tool Number: " + ToString(Activity.GetToolNumber())
OutputTextList.Append(TextLine)
	
// Tool Name
TextLine = "Tool Name: " + Activity.GetToolName()
OutputTextList.Append(TextLine)

Set Machining Operation

This way, the information available on Machining Operation can be accessed. 

Set MchOpe = Activity

Get Machining Feed Rate Information 

Depending on the global Feed rate magnitude value, whether it is "LINEARFEEDRATE" or "ANGULARFEEDRATE", the type of variable used to store the Feed rate Value changes. But the attribute which provides this value remains same. The information is converted in text line, and it is added to the Output Text List.

// Machining Feedrate
	if (MchOpe.MfgGlobalFeedrateMagnitude == "LINEARFEEDRATE")
	{
		LinFeedRate = MchOpe.MFG_FEED_MACH_VALUE
		TextLine = "Feedrate: " + ToString(LinFeedRate)
	}
	else
	{
		
		AngFeedRate = MchOpe.MFG_FEED_MACH_VALUE
		TextLine = "Feedrate: " + ToString(AngFeedRate)
	}
	OutputTextList.Append(TextLine)

Get Spindle Speed Information

Depending on the global spindle magnitude value, whether it is "LINEARSPINDLESPEED" or "ANGULARSPINDLESPEED", the type of variable used to store the Spindle Speed Value changes. But the attribute which provides this value remains same. The information is converted in text line, and it is added to the Output Text List.

// Spindle speed
	if (MchOpe.MfgGlobalSpindleMagnitude == "LINEARSPINDLESPEED")
	{
		LinSpeed = MchOpe.MFG_SPINDLE_MACH_VALUE
		TextLine = "Spindle: " + ToString(LinSpeed)
	}
	else
	{
		AngSpeed = MchOpe.MFG_SPINDLE_MACH_VALUE
		TextLine = "Spindle: " + ToString(AngSpeed)
	}
	OutputTextList.Append(TextLine)

Set the Output Format of the Text Choreography

Here we can set the Font name and Font Size of Text, window position, Background Color, Background Transparency. Also, it is possible to control these visual properties based on the certain conditions if they are met.

OutputFormatList.Append(List("WindowPosition", "TOP_CENTER"))
OutputFormatList.Append(List("FontName", "Lobster"))
OutputFormatList.Append(List("FontSize", "20"))
OutputFormatList.Append(List("BackGroundColor", "0, 255, 0"))
OutputFormatList.Append(List("BackGroundTransparency", "115"))

Set Outputs.

/* OUPUTS */
Parameters->SetAttributeObject("Output_text", OutputTextList)
Parameters->SetAttributeObject("Output_format", OutputFormatList)

Note: For on-premises users the sample business rule script DELNCChoreographyGeneration_BL_ID.CATRule is located in ...\resources\knowledge\scripts.

 

Business Rule Setup

Steps to follow:

  1. Launch 3DExperience platform and access the target collaborative space with Owner responsibility. 
  2. Open Data Setup App
  3. In Resource Table Section, under Machining Business Logic add new resource set.

  4. Once the Resource Set is created, Edit the selected resource table.

  5. For "How to generate NC choreography" resource create a new business rule.
  6. In Business Rule Editor, in Arguments List, set the type of "ThisObject" variable as "MachiningOperation". 

  7. Copy Paste the Script Body from attach text file and click OK.
  8. Select the Newly create Business Rule and Click OK.

  9. Save Data Setup.

Reference

For more detailed information please refer to the user guide.

 For more information on how to determine the EKL Type of the Object and access the attributes information on it, please refer to below Wiki Page.

Author

Person of Contact - @Sheetal MARDE 

Special Thanks to @Vivek BAGALKOT and @Pavankumar K M for providing support in this topic.