General InformationThe Input ObjectsYou can use the attributes of a machining operation. Input objects must be of the following types:
Additional InformationUse the following names to set the corresponding default text events attributes:
Example of usage
/* COMPUTATION RULE DELNCChoreographyGeneration_BL_ID
GOAL: To define content and format of text choreography generated by 'Generate Choreography Event' command
INPUT parameters:
MachiningOperation: Selected machining operation.
OUTPUT parameters:
Output_text: List of text lines to be displayed in the text choreography event
Output_format: List of lists defining the format of text choreography event.
Each list contains two strings, one for the format attribute name and one for the format attribute value:
* FontName: text font (ex: "Arial")
* FontSize: text size
* TextColor: text color expressed in RGB (ex: "0, 0, 0" for black)
* BackGroundColor: panel color expressed in RGB
* BackGroundTransparency: panel transparency [0 - 255]
* WindowPosition: TOP_CENTER, MIDDLE_CENTER, BOTTOM_CENTER, TOP_LEFT, MIDDLE_LEFT, BOTTOM_LEFT, TOP_RIGHT, MIDDLE_RIGHT, BOTTOM_RIGHT
* WindowWidth: panel width size (default is 375)
* WindowHeight: panel height size
* Duration : duration of the event (default is tool path machining time)
EXAMPLE of usage:
Let OutputTextList(List)
Let OutputFormatList(List)
Let Activity(ManufacturingOperation)
Let TextLine(String)
// INPUT
Set Activity = Parameters->GetAttributeObject("MachiningOperation")
// Text
TextLine = "Tool: " + Activity.GetToolName()
OutputTextList.Append(TextLine)
// Format
OutputFormatList.Append(List("BackGroundColor", "0, 255, 0"))
OutputFormatList.Append(List("BackGroundTransparency", "115"))
OutputFormatList.Append(List("WindowPosition", "TOP_CENTER"))
OutputFormatList.Append(List("FontName", "Arial"))
OutputFormatList.Append(List("FontSize", "20"))
OutputFormatList.Append(List("TextColor", "0, 0, 255"))
// OUPUTS
Parameters->SetAttributeObject("Output_text", OutputTextList)
Parameters->SetAttributeObject("Output_format", OutputFormatList)
*/
Let OutputTextList(List)
Let OutputFormatList(List)
Let Activity(ManufacturingOperation)
Let MchOpe(MachiningOperation)
Let TextLine(String)
Let LinFeedRate(LINEARFEEDRATE)
Let AngFeedRate(ANGULARFEEDRATE)
Let LinSpeed(LINEARSPINDLESPEED)
Let AngSpeed(ANGULARSPINDLESPEED)
/* INPUT */
Set Activity = Parameters->GetAttributeObject("MachiningOperation")
/* Business Rule Logic*/
if (true == Activity.IsSupporting("MachiningOperation"))
{
// Tool number
TextLine = "Tool Number: " + ToString(Activity.GetToolNumber())
OutputTextList.Append(TextLine)
// Tool Name
TextLine = "Tool Name: " + Activity.GetToolName()
OutputTextList.Append(TextLine)
Set MchOpe = Activity
// 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)
// 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)
}
OutputFormatList.Append(List("WindowPosition", "TOP_CENTER"))
OutputFormatList.Append(List("FontName", "Arial"))
OutputFormatList.Append(List("FontSize", "20"))
/* OUPUTS */
Parameters->SetAttributeObject("Output_text", OutputTextList)
Parameters->SetAttributeObject("Output_format", OutputFormatList)
| |||||||||||||||||||||||||||