By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,594 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,594 IT Pros & Developers. It's quick & easy.

AutoCAD Problem in VB

P: 89
Hi all,
I have a problem with opening and closing AutoCAD in VB6 properly. I opened AutoCAD in VB by
Expand|Select|Wrap|Line Numbers
  1. Dim AcadApp As Object, acadDoc As Object
and close it by
Expand|Select|Wrap|Line Numbers
  1. Set acadDoc = Nothing
  2. Set AcadApp = Nothing
So, it opens and closes properly. I am opening many autoCAD files by using loop. In that time if I put more than about 30 times loop it says "memory out". In that case how can I solve this problem? I guess AutoCAD doesn't close properly, even though it looks close but maybe something is kept in buffer(RAM). So how is it possible to make free RAM in VB? Also if you know 100% close AutoCAD in VB without any buffer data. Thanks in advance.....Shaif
Dec 31 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 5K+
P: 8,434
You aren't actually closing anything. You're just releasing your reference by setting it to Nothing. See whether each of the objects you're creating has a Close method. I think that in general you should first close it, then release it. (I don't do a lot of work with objects like this, though.)
Dec 31 '07 #2

P: 89
Hi, Ya u r correct, I actually did not close object, now i closed object and its works very well. Thx a lot for ur valuable idea. thx again.
Dec 31 '07 #3

Expert 5K+
P: 8,434
Hi, Ya u r correct, I actually did not close object, now i closed object and its works very well. Thx a lot for ur valuable idea. thx again.
Great! Glad we could help out. :)
Dec 31 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.