I have a form with a checkbox that the operator will use to tell the program whether or not to create an excel report. No matter what the checkbox says though, I need it to create the pdf report of the dimensions. I have an IF/ELSE statement with a print command inside that will trigger depending on the checkbox. Everything with the statement is working as it should, however when the code is present it will erase all of the stuff in the pdf report, so when the prompt comes up to save the pdf it has nothing to save. The excel is still saved properly and auto-indexed, and everything works with writing data to a .txt file, but the data in the pdf is being deleted. If I remove the IF/ELSE statement everything works as it should, but I need that in there for what we need. Any ideas?
Issue with print commands
Collapse
X
-
Which version of PC-DMIS? I know the problem with multiple print commands has been discussed before, IIRC, SABarber showed a way to refresh the report data so it worked also a second time. Try searching the forums again...AndersI
SW support - Hexagon Metrology Nordic AB
Comment
-
I beleive this is what AndersI was talking about. We use it to Autosave our reports refresh the report window, then print the reports.
Code:Sub main() Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim repwin As Object Set repwin = part.reportwindow repwin.refreshreport 'refresh report End Sub
Comment
-
It’s been mentioned before that a PRINT command will output the data up to that point. The next PRINT command will output data that was generated after the prior PRINT. You seem to have a print for excel and another for pdf. Why not combine the excel with pdf for excel output another print for just pdf wrapped with if/else to decide what output is desired. There are ways to drive the data into a report after a print (insert report template using the same template with the option other than switch. Not in front of pcdmis so can’t remember the option. INSERT if I recall correctly.) A report refresh will probably work but could have side effects if done before all features/dimensions are reported.Last edited by SABarber; 05-11-2019, 08:48 PM.
Comment
Related Topics
Collapse
-
by mattfurtawLet's see if I can explain this.
Goal - Output a PDF to the operator on the screen with just the out-of-tolerance dimensions but have it save...-
Channel: PC-DMIS for CMMs
01-11-2013, 01:03 PM -
-
by MykelHi guys/gurus.
I've been trying to make a Master-template that saves paper everytime I run a measurement.
I have 4 input-values,...-
Channel: PC-DMIS for CMMs
04-13-2015, 04:16 AM -
-
by RookieHey, guys. Never seen this situation before.
I have a SELECT/CASE that contains a print command for either printing the report only to...-
Channel: PC-DMIS for CMMs
03-23-2016, 03:04 PM -
-
by SoberYangHi all
I got an error message after part program execute (Report window print setup :File &Auto) . PC-DMIS show "Can not start...-
Channel: PC-DMIS for CMMs
08-11-2009, 08:05 PM -
-
by R2ah1ze1lHey everyone,
I'm sure I am not alone in what I have seen with PC-Dmis as far as this error that occurs:
Operator runs part...-
Channel: PC-DMIS for CMMs
07-23-2014, 03:56 PM -
Comment