How To: Operation Group Prompts

Post Reply
User avatar
US_Helpdesk
Moderator
Moderator
Posts: 1092
Joined: Wed Feb 23, 2011 7:26 pm

How To: Operation Group Prompts

Post by US_Helpdesk » Wed Jun 12, 2013 11:58 am

It may be the case that each part has a serial number or some information that you want to prompt the operator for that is unique for each part. This prompt could be added inside the Operation Group but this is time prohibitive since the operator would need to monitor the CMM Program as it runs to enter values for each of these prompts as the program progresses from one part to the next. Instead it makes better sense to prompt for all values at the beginning of the program.

Before the Operation Group add a VB Script that asks how many parts will be run and then loop an InputBox that number of times. Use an array to store the response of the InputBox.

Code: Select all

Dim serial(10)
MyNum = InputBox("How many serial numbers do you want to enter?")
FOR Group_INDEX=1 TO MyNum
serial(Group_INDEX) = InputBox("What is the serial number for part " + CStr(Group_INDEX))
Next
Now later in the program you can access the operator's responses by retrieving the stored Array value within each loop of the Operation Group. These values could be written to the report as a User Defined Dimension, used for Feature Naming, etc. In this case the Array "serial" is used to write variables PlaneName and PointName, notice the Group_INDEX will increment by 1 each time the next Operation Group loop is executed.

Code: Select all

PlaneName = "Plane_" + CStr(serial(Group_INDEX))
PointName = "Point_" + CStr(serial(Group_INDEX)) 
See attached file for more detail....
You do not have the required permissions to view the files attached to this post.
I've migrated to a new user account, see my other posts here

Post Reply