Adding a material thickness to a dim.

Post Reply
wstephens
Participant
Participant
Posts: 7
Joined: Fri Nov 13, 2015 11:04 am

Adding a material thickness to a dim.

Post by wstephens » Fri Nov 13, 2015 1:10 pm

Hello,

Our company purchased CMM Manager 3.4 and we recently started programing. Our parts are pretty basic, but some of our dimensions require a "distance between 2 points" plus a material thickness (.025) or a diameter minus a material thickness. With the exception of these 2 issues all of the other programming is straight forward. I have been told that I need to include VB script to calculate this and to report the dimension. So, since I am very very limited in VB script I was hoping that someone help or give examples of what I need to do. Thanks in advance for the help!

Wayne

medupriest
SUDO
SUDO
Posts: 423
Joined: Fri Mar 13, 2015 11:59 am

Re: Adding a material thickness to a dim.

Post by medupriest » Fri Nov 13, 2015 4:37 pm

This is the code in line 3

Code: Select all

VAR1 = inputbox("enter material thickness")
This is the code in line 12

Code: Select all

DIST1 = GetReportInfo("DIST BT CIRCLE1 AND CIRCLE2", "XY", 2)

NOM1 = GetReportInfo("DIST BT CIRCLE1 AND CIRCLE2", "XY", 1)

DIST1 = DIST1+VAR1

NOM1 = NOM1+VAR1
with those two scripts, add a user defined dimension as shown below.
VB3.png
You do not have the required permissions to view the files attached to this post.

wstephens
Participant
Participant
Posts: 7
Joined: Fri Nov 13, 2015 11:04 am

measure 5pc sample size

Post by wstephens » Mon Nov 30, 2015 3:51 pm

The above calculation works great, thanks. But we measure 5 pieces sample sizes and when I create a loop for the program it actually runs and reports all 5 parts. However, it reports the exact same dimension/calculation on parts 2 thru 5 as it did on part number 1 it only does this where the dimensions have the VB script and the feature is re-labeled automatically. I can run as a batch run and get the different dimensions, but I have to initiate the batch run each time the program starts and it too re-labels the feature. I guess what I am asking is there a way to use the loop operation (5 pcs.) and capture the dimensions from the 5 individual parts under the same feature label? Thanks again for the help!

medupriest
SUDO
SUDO
Posts: 423
Joined: Fri Mar 13, 2015 11:59 am

Re: Adding a material thickness to a dim.

Post by medupriest » Mon Dec 07, 2015 3:06 pm

The sample program is attached to this post will get the job done. There may be a cleaner way to accomplish the request, but it does work. An actual point is constructed by offsetting a point by the material thickness rather than adding the material thickness to the reported data and using a user defined dimension.

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

Post Reply