Is there a variable statment or something I can put in my program to show the "Total # of Measured Features" & the "Total # of Out of Tolerance" features on my report like V3.7 did automatically?
V4.1 - Total Measured - OUT OF TOL like 3.7
Collapse
X
-
This should do it but I have not run it. I took that outtol.bas and changed it a little. I do not know who originally authored that bas, it is from Wilcox's site. You'll need a variable in your PCDMIS part program called NUMBEROUTTOL and one called TOTALMEASURED. NUMBEROUTTOL is the number out of tolerance and TOTALMEASURED is the total dimensions reported. Like I said I have not even run this so I have no idea what any pitfalls may be. It will not work on 3.2063 that I do know. 3.2063 does not support GetVariableValue and SetVariableValue. If you want to run it on that you'll need to write the info to a text file with the bas and read it in with PCDMIS.
Code:Sub Main() 'this *.bas is a simple, modified version of the outtol.bas whose author I do not know 'if any one knows the author credit them here ' 'craig Dim objApp As Object Set objApp = CreateObject("PCDLRN.Application") Dim objPart As Object Set objPart = objApp.ActivePartProgram Dim objCmds As Object Set objCmds = objPart.Commands Dim objCmd As Object Dim objDimCmd As Object Dim dblOutTol As Long dblOutTol = 0 Dim dblTotalMeas As Long dblTotalMeas = 0 Dim objOutTol As Object Set objOutTol = objPart.GetVariableValue("NUMBEROUTTOL") Dim objTotalMeas As Object Set objTotalMeas = objPart.GetVariableValue("TOTALMEASURED") For Each objCmd In objCmds If objCmd.IsDimension Then If objCmd.Type <> DIMENSION_START_LOCATION And _ objCmd.Type <> DIMENSION_END_LOCATION And _ objCmd.Type <> DIMENSION_TRUE_START_POSITION And _ objCmd.Type <> DIMENSION_TRUE_END_POSITION Then Set objDimCmd = objCmd.DimensionCommandlng dblTotalMeas = dblTotalMeas + 1 If objDimCmd.OutTol > 0 Then dblOutTol = dblOutTol + 1 End If End If End If Next objCmd objOutTol.DoubleValue = dblOutTol objTotalMeas.DoubleValue = dblTotalMeas objPart.SetVariableValue "NUMBEROUTTOL", objOutTol objPart.SetVariableValue "TOTALMEASURED", objTotalMeas End Sub
Last edited by craiger_ny; 11-15-2006, 02:34 PM.<internet bumper sticker goes here>
Comment
-
Hmmmm...
I just noticed that in the text window of my CMM program that the information I'm trying to get to my report is already there. See picture below...
http://i76.photobucket.com/albums/j2...untitled-1.jpg
There's gotta be a way to get that into my report window. Maybe I should just go back to 3.7Mr3 until 4.2 is released . . .sigpic
Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
PCDMIS 2012
Windows Office XP
Comment
-
You should be able to do this with reporting expressions by adding in the following code into a Text object's text property or inside of a GridControlObject's cell:
=NUMMEAS()
=NUMOUTTOL()Jared Hess - PC-DMIS Documentation Team Lead @ HMI
[View 2008 Reporting Tutorials Here]
Comment
-
Originally posted by JaredHess View PostYou should be able to do this with reporting expressions by adding in the following code into a Text object's text property or inside of a GridControlObject's cell:
=NUMMEAS()
=NUMOUTTOL()sigpic
Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
PCDMIS 2012
Windows Office XP
Comment
Related Topics
Collapse
-
by jkb_mcgGreetings,
I have just received V4.1. I am just curious if anybody has any cautions or warnings, before doing the install?-
Channel: PC-DMIS for CMMs
11-16-2006, 08:37 AM -
-
by DeWain Hodge
I have a text only report template that I made that includes our company logo. I have set it as the default template for all my existing...-
Channel: PC-DMIS for CMMs
04-16-2008, 04:46 PM -
-
by dwadeI've been trying get new people here into the routine of NOT going by theCode:
# OUT OF TOL =#NOUT
-
Channel: PC-DMIS for CMMs
12-15-2008, 06:27 AM -
-
by QCinTNHas anyone had any luck modifying the text only report using the legacy label templates to make V4.1 reports look like V3.7? I got the colors/borders...
-
Channel: PC-DMIS for CMMs
08-09-2006, 04:41 PM -
-
by mchough1Hi guys,
I am hoping that someone has been hacking around with the reporting in 4.1. I am having problems displaying a simple variable...-
Channel: PC-DMIS for CMMs
08-22-2006, 12:02 PM -
Comment