When looping Program steps by use of VB Script loop - i.e. For Loop, Do Until, etc. - Features that have been executed more than one time will automatically be renamed using standard convention as such - Circle1, Circle1...1, Circle1...2, Circle1...3, etc. You may want to facilitate more meaningful names, this is especially true in nested loops like this:
- For i = 1 to 10
- For k = 1 to 10
- ...
- ...
- Next
- Next
This nested loop scenario is typical for loops used to create a rectangular grid of features / groups of features. A more useful naming convention might be - Circle_1_1, Circle_1_2, Circle_1_3, Circle_2_1, Circle_2_2, Circle_2_3, etc. - This method will give the recipient of report document some sense of which circle is which based on logical naming convention.
Here is an example of nested VB Script Loop that facilitates VB Variable that will be used in Name field of Feature Operation:
- for i = 1 to 10
- for k = 1 to 10
- MyFeatName = "Circle_" + CStr(i) + "_" + CStr(k)
- next
- next
If Measured or Reported Feature(s) are inserted between VB Script lines 3 & 4, the user may rename feature using the "@" character to specify variable replacement of name as shown below:
In Teach Mode the Feature Name in the Feature Database will be shown as above. Then any subsequent Report or Construction Operations will show the name in this same manner:
After Program is run (in Run Mode) the Feature Names will be replaced by VB Variable String value, thus providing unique and meaningful names for each Feature as shown here:
It is also possible to create Variable text for the User Note Report operation. This could be used to create periodic User Notes in the Report that help break the report document into logical groupings. A VB Script included inside of a loop could be used to create unique Variable Text for these User Notes as shown here:
- MyUserNote = "Report Section Number " + CStr(i)
A single User Note operation placed inside of a VB Loop results in multiple unique User Notes within the Report.
See attached example program. This program can be executed on simple rectangular block such as gage block or 1-2-3 block with minimum top surface width and length of 50mm x 50mm.