I´m working in an excel automation of data collection directly from PCDMIS. Every communication is finished but my idea is create a system 100% automatic.
Also I already created an executable program (.EXE) to execute the excel (at PCDMIS) macro directly but I still need press a button to start the macro.
I have a question yet:
How Can I to create a code to auto execute at PCDMIS ?
For example: We use the QS-STAT Converter in our measurements and PCDMIS we use at final of EXE insertion the \A (inverted bar + A) to auto execute.
I would like to know how I can to insert it in my code.
You should be able to use the PC-DMIS ApplicationEvents interface to monitor when PC-DMIS have finished running the partprogram to trigger your Excel macro.
You can add an auto execution in your Excel macro :
In the "ThisWorkboot" window, you just write :
Private Sub Workbook_Open()
(The name of your Excel macro)
End sub
The excel file is OK (finished) with a macro named as openAutomatic().
I created a *.exe program to start the macro of my excel file. But I still need to press a button to start the routine. I know that PCDMIS can to auto execute a routine if in the final of line where I inserted my external program I insert the command "\A".
My idea is create a system 100% automatic.
Ok ! your suggestions are interesting but Sometimes I need to open the excel file without the input data necessity from PCDMIS (only to analyse the graphs, for example).
I know that I have some possibilities but I would like to know if anybody know how use the directly code at PCDMIS.
My simpleton way to do this would be to write a .txt file from PC-DMIS right before calling the .exe. Just a blank .txt file, C:\TEST.TXT, with no data in it.
When excel opens, the macro checks for the existence of this .txt file. If it does exist, run the macro and import the PC-DMIS data, then delete the .txt file. If it does not exist, the excel file is opening only for viewing, not for importing of data.
Ok guys!
I saw that better way is use a macro when open the excel file. It is more simple and I can to verify if pcdmis is opened - check the name of part program... So I would like thank all replys.
I stayed interested to adapt my EXE program to auto execute directly by pcdmis.
Hi Cortrelli
Did you managed to export your data to the Excel spreadsheet. If you haven't been able to get it working, let me know. We have a program which extraxct the dimensional info directly from PC DIMIS into an Excel sheet. I will share the data sheet if need. You can contact me be email.
Japie.dutoit@gm.com