Automating CMM Manager with VBScript: A Practical Training Guide

Written by Sam Jagger

Why VBScript Matters in Metrology

VBScript (Visual Basic Scripting Edition) is a lightweight, embedded programming language that offers tremendous flexibility and automation capabilities in quality control and inspection software like CMM Manager. Whether you're working with complex part geometries or standardizing inspections across teams, VBScript enables you to:

Advantages of VBScript in CMM Manager:

  • Automate repetitive tasks
    Replace manual steps like alignment, naming, or feature construction with fast, reusable script logic.

  • Add decision-making to inspections
    Use conditions, prompts, and user input to build smarter, more adaptive part programs.

  • Generate dynamic reports
    Automatically calculate and insert inspection results into custom report formats, complete with pass/fail status and error handling.

  • Minimize operator error
    By scripting logic and message prompts, you can guide operators through workflows more reliably.

  • Scale inspection programs efficiently
    Easily adapt scripts across similar parts, even when CAD geometry or probing strategies change.

VBScript transforms CMM Manager from a point-and-click tool into a powerful metrology automation platform — with logic, intelligence, and control built in.

What You'll Learn in This Training

1. CAD Integration with VBScript Logic
Use VBScript to import CAD models, assign part names dynamically, and trigger alignment routines based on input conditions.

2. Automated Alignments Using VBScript
Script alignment strategies based on part revision or fixture positions.

3. Creating Cross Sections with Conditions
Automatically generate cross sections based on logic like probe availability or feature requirements.

4. Cloud-to-CAD with Scripted Tolerance Checks
Compare point clouds to CAD models and auto-flag results using scripted logic.

VBScript Examples for CMM Manager

Example 1: Prompt for Operator Input

OperatorName = InputBox("Enter your name:", "Operator Login")
If OperatorName = "" Then
    MsgBox "No name entered. Please restart the program.", vbCritical
    End
End If

Example 2: Automated Alignment Based on Fixture Condition

If GetVariable("Fixture_Type") = "FixtureA" Then
    RunCommand("Align_FixtureA")
Else
    RunCommand("Align_Default")
End If

Example 3: Color Code Tolerance Failures

If GetMeasured("Hole1") > GetNominal("Hole1") + 0.1 Then
    MsgBox "Hole1 is out of tolerance!", vbExclamation
    SetColor("Hole1", "Red")
End If

Example 4: Dynamic File Naming for Reports

PartID = InputBox("Enter Part ID:")
SaveReport "C:\Reports\" & PartID & "_" & Date & ".pdf"

Example 5: Custom Loop for Multiple Features

Dim i
For i = 1 To 5
    FeatureName = "Hole" & i
    Measure FeatureName
    If GetMeasured(FeatureName) > GetNominal(FeatureName) + 0.05 Then
        MsgBox FeatureName & " is out of tolerance"
    End If
Next

Where VBScript Makes the Difference

Resources

  • CMM Manager Free Training page
    Basic CAD and alignment tutorials with video walkthroughs.

  • Learn How to Work With VB Script in CMM Manager ($95)
    A specialized course focused on scripting methods inside CMM Manager—ideal for users ready to automate.

  • CMM Manager Handbook ($95)
    Includes VBScript syntax, use cases, and ready-to-use examples.

  • CMM Manager DCC Video Training ($275)
    A complete visual course featuring 48+ lessons, including advanced scripting applications.

Who Should Use VBScript in CMM Manager?

  • Quality engineers needing custom inspection logic

  • Automation technicians optimizing cycle times

  • CMM programmers reducing repetitive input

  • Training instructors building adaptive workflows

Ready to Get Started?

  1. Visit the CMM Manager Free Training page.

  2. Explore key topics like Datum Alignment, Creating Cross Sections, and Cloud-to-CAD.

  3. Start integrating VBScript into your workflows for smarter inspection!

Previous
Previous

Video - Part Setup in Program

Next
Next

Create a Dialog Box with an Image