VB script to identify active program folder

Advanced techniques applicable to any version of CMM-Manager
Post Reply
New User
New User
Posts: 1
Joined: Thu Jan 31, 2019 1:51 pm

VB script to identify active program folder

Post by Erik_Kump » Thu Mar 14, 2019 3:05 pm

Is there a mechanism for VB script to be able to identify the specific folder the currently running program exists in? I am new to CMM-Manager and VB, but what I'm trying to accomplish is this:

I have a program with multiple machining operations, Mill and Wire EDM. An inspection op is required for each step, so I have Operation Plans set for those (thanks to Paul at the Help Desk). Each operation has complex geometries being checked via profiles, so graphic reports are required. So every time the Mill op is run, a Mill report filled with valuable part data is generated, along with a Wire report filled with useless zeroes. I'm looking for a way to automate the details of file management.

My thought was to have the program edit a Windows batch file, giving it the useless report's name and location. The program would then chain into a dummy program with an External Command that would call the batch file, which contains code to remove the dud report.

Thank you.

User avatar
Site Admin
Site Admin
Posts: 367
Joined: Thu Feb 09, 2017 4:07 pm

Re: VB script to identify active program folder

Post by CrashN8 » Fri Mar 15, 2019 4:34 pm

You can add Report Header info containing file path of program from Report Preferences. Maybe this helps? Although trying to delete Report while CMM-M program is still executing is not possible since report is not saved until each operation in program is done running. This deletion of files will need to occur after the program is done running.

I think you could create Batch File that looks for reports containing all 0 deviation report data and delete.

You do not have the required permissions to view the files attached to this post.

Post Reply