VB Script - Getting Started
What can I do with VB Scripting?
The CMM-Manager VB Scripting engine is based on
Windows VBScript Active Scripting Language. All standard VBScript functions, commands, etc. are available inside of CMM-Manager, as well as some application specific commands used to extract Feature, Report and Machine variables into the currently running VB Script. For example, you can set a variable from actual
Feature data as follows:
- MyDia = GetFeaturePropertyAct("CIRCLE1", 7)
Or from Report data like this:
- MyDia = GetReportInfo("CIRCLE1", "DIA", 2)
VB Variables can then be introduced back into measured features, report characteristics, feature names, report header data, etc. using the Set Variables button as shown below:
User Guide
The CMM-Manager specific VB Script user guide is found here - C:\Program Files\QxSoft\CMM-Manager xxxx\Help\User Guide - VB Script.pdf - on any PC with CMM-Manager installed. See latest version of this file attached to KB article below.
Online Resources
Related Articles
VB Script - Variable use for Feature Names and User Notes
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, ...
Parametric Programming - Part Families
Do you manufacture and inspect Part Families? Meaning, variety of parts having similar overall geometry but with varying dimensional characteristics? Instead of cresting one program for each unique part, you can realize significant time savings by ...
Launch CMM-Manager Program using External Command
It is possible to run another CMM-Manager Program from the External Command operation. This is useful if you'd like to create a simple launching program - i.e. main program that prompts user for next program, and then runs accordingly to user ...
VB Script - Calculate Measured Arc Length
To find the Arc length, you need 3 measurements. A circle (Arc), and a line or point at each of the Arc. From there, construct lines from the center of Circle to Arc's endpoints and report both the diameter of Circle and Angle between two constructed ...
VB Script - Prompt to skip manual Alignment
Many times a CMM program may have a manual alignment followed by a DCC alignment. In some cases, the manual alignment does not need to be executed each time the program is run. This is true if subsequent running of the program is done with each part ...