DDE Reports not closing

Topics applicable to newer version(s) of CMM-Manager (3.0+)
jswope
Super User
Super User
Posts: 187
Joined: Fri May 17, 2013 12:50 pm

DDE Reports not closing

Post by jswope » Thu Sep 21, 2017 9:54 am

Is there a way to make the DDE report close after the program runs. It closes it part of the time but not all after the program ends.
Capture.JPG
You do not have the required permissions to view the files attached to this post.

ameade022008
Power User
Power User
Posts: 76
Joined: Thu Oct 03, 2013 12:48 pm
Location: Tempe, AZ
Contact:

Re: DDE Reports not closing

Post by ameade022008 » Mon Sep 25, 2017 2:42 pm

Have had same issue
Albert Meade
Quality Manager, Metalcraft Inc.
http://azmetalcraftinc.com/

User avatar
Ryan Christopher
Nikon
Nikon
Posts: 251
Joined: Mon Jun 06, 2011 3:00 pm
Location: Sumner Washington
Contact:

Re: DDE Reports not closing

Post by Ryan Christopher » Thu Nov 02, 2017 1:55 pm

SendKeys could do it...

Put something like this into the vbs editor in CMM-M. Excel will be forced to close when CMM-M runs the script.

==============================================================
Dim oShell
Set oshell = CreateObject("WScript.Shell")
oshell.Run Chr(34) & "C:\Windows\System32\cmd.exe" & Chr(34), 1, false
WScript.Sleep 1000
oShell.SendKeys "taskkill /im excel.exe"
oShell.SendKeys "~"
WScript.Sleep 1000
oShell.SendKeys "exit"
oShell.SendKeys "~"
Set oshell = Nothing
==============================================================
Ryan Tackes
Applications Manager, VMS Inc.
http://www.vantagemeasure.com/

SDNPDG_Quality
User
User
Posts: 14
Joined: Mon May 08, 2017 1:58 pm

Re: DDE Reports not closing

Post by SDNPDG_Quality » Thu Feb 08, 2018 8:21 am

I tried the VB script as suggested:
==============================================================
Dim oShell
Set oshell = CreateObject("WScript.Shell")
oshell.Run Chr(34) & "C:\Windows\System32\cmd.exe" & Chr(34), 1, false
WScript.Sleep 1000
oShell.SendKeys "taskkill /im excel.exe"
oShell.SendKeys "~"
WScript.Sleep 1000
oShell.SendKeys "exit"
oShell.SendKeys "~"
Set oshell = Nothing
==============================================================

However, it did not work. It opened a command window, but didn't close the file. Has CMM Manager addressed this issue in the new release? If not, it should just be as simple as finding out what the default variable name is for the IO.StreamWriter, so that it can be closed at the end of the CMM program.

mhenson
User
User
Posts: 13
Joined: Wed Aug 02, 2017 2:13 pm

Re: DDE Reports not closing

Post by mhenson » Tue Feb 13, 2018 2:20 pm

I'm seeing this same issue lately, and it appears that the excel process that continues to run is tied in "symbiotically" to the CMM-M process. If I force kill Excel from the task manager, CMM-M loses the ability to read or write from excel files until CMM-M is restarted (I'm running 3.5). However, if I close CMM-M, the excel process closes too. It's a bit of a hassle to have to restart CMM-M for every part we measure though, and I have yet to find a way via scripting that can successfully separate the two processes.

quality
Regular User
Regular User
Posts: 17
Joined: Wed Apr 18, 2012 10:39 am

Re: DDE Reports not closing

Post by quality » Mon Nov 11, 2019 1:55 pm

Has anyone come up with a fix for this? I am running 3.7 and sometimes I can run different programs with no problem. Other times, the data that is exported to Excel goes into the previously ran program's spreadsheet. I agree with mhenson, definitely a hassle to have to restart CMM-M in order to eliminate the link between CMM-M and Excel.

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

Re: DDE Reports not closing

Post by CrashN8 » Mon Nov 11, 2019 2:57 pm

This is a known issue and will be resolved in 3.9 SP2. This version of CMM-Manager is scheduled to release as soon as this week. The scripting "fixes" mentioned above work on some but not all PCs. I think this script does not work in Windows 10. Either way, the ultimate resolution will be updating to 3.9 SP2 once it releases.

quality
Regular User
Regular User
Posts: 17
Joined: Wed Apr 18, 2012 10:39 am

Re: DDE Reports not closing

Post by quality » Thu Nov 21, 2019 11:11 am

Very exciting news! I look forward to the next release. Thank your so much for the response.

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

Re: DDE Reports not closing

Post by CrashN8 » Fri Nov 22, 2019 10:30 am

Should be today or Monday... Stay Tuned.

AndyCEI
Getting Started
Getting Started
Posts: 5
Joined: Thu Feb 27, 2020 9:00 am

Re: DDE Reports not closing

Post by AndyCEI » Wed May 13, 2020 11:42 am

Idk where to leave this, so this seemed like the right place. But right now I'm highly interested in the DDE feature, and I'm getting into testing it. I tried to use DDE for all the features saved a excel file just for this test. But when the program on CMM manager comes around to executing the DDE I get an error saying unable to launch excel. Any suggestions ?

Post Reply