Not Exiting Correctly

106 views
Skip to first unread message

Chris

unread,
Dec 29, 2009, 11:14:32 AM12/29/09
to SolidWorks-API
Hello,
I have a macro that is causing a problem for me. It is a printing
and saveas macro. After running it, I usually exit SolidWorks. The
next time I open SolidWorks I get the warning: "A journal file could
not be created. Auto recover will not work. Another session of
SolidWorks may already be running on this machine." When I look to
see what processes are running on my machine, SolidWorks does not show
up.

Is there something I should be doing in my macro to release some
SolidWorks items that stay open? I've written a lot of macros and
never had this problem. Any help would be appreciated.

I'm running SolidWorks 2009 SP4.1, Windows Vista Business SP 2.0

Thanks.

Deepak Gupta

unread,
Dec 30, 2009, 12:29:03 AM12/30/09
to SolidWorks-API
Chris,

I'm just a beginner in macros/API. I would like to ask as why you have
to exist the SW. Also I believe that apart from SW, there are few more
processes which run along with SW (like SolidWorksLicTemp.001,
SolidWorksLicensing.exe. etc.) and they might not be getting closed
after you exist SW and can be the reason for the message.

Deepak Gupta
SW2009 SP4.1
SW2007 SP5.0
http://gupta9665.wordpress.com/

"Please consider the environment before printing this email."

Eduardo

unread,
Dec 30, 2009, 7:30:42 AM12/30/09
to SolidWorks-API
Does your code looks like the API Help Example "Print Drawing and Save
as PDF (VB6)" ?

If you run this exemple on your machine does the problem persist?

Chris

unread,
Dec 30, 2009, 10:04:25 AM12/30/09
to SolidWorks-API
After your comments, I went back to track what was happening a bit
closer. The problem only occured when I printed, not when I saved as
a PDF or AutoCAD. The SolidWorksLicTemp.001 shuts off as soon as I
exit SolidWorks. The SolidWorksLicensing.exe stays on for about 30
seconds then shuts off.

There is a process running called hpmup083.bin that stays on after I
print with the macro. I think I will investigate what is happening
when I print. Below is the command I'm using. Is there a better one
I should be using?

If CheckBoxPrint Then

Dim p As Integer
Dim iPrintCopies As Integer

iPrintCopies = TextBoxCopies.Text
For p = 1 To iPrintCopies
Document.PrintDirect
Next p
End If

Thanks.

Eduardo

unread,
Dec 30, 2009, 10:16:38 AM12/30/09
to SolidWorks-API

Chris

unread,
Dec 31, 2009, 8:04:22 AM12/31/09
to SolidWorks-API
Thanks Eduardo. That is exactly what is happening to me. I will get
my systems guy to upgrade to the new HP version. Have a Happy New
Year!
Reply all
Reply to author
Forward
0 new messages