PC Review


Reply
Thread Tools Rate Thread

anyone know vbnet in autoCad? I keep crashing acad.

 
 
mp
Guest
Posts: n/a
 
      21st Jun 2010
I get the instance of autocad thusly
....in Init method of main Class
'create a utility class that grabs Acad's running process and returns via
properties
If m_util Is Nothing Then

m_util = New MCSUtil(True)

m_util.Init2(True)

m_acadApp = m_util.ACAD

m_acadDoc = m_util.AcadDoc

End If



in the utility class...

Public Class MCSUtil

Private m_acadDoc As AcadDocument

Private m_AcadApp As AcadApplication = Nothing

.....

and the Init2 method:

Function Init2(ByVal bDebug As Boolean) As Boolean

m_Debug = bDebug

Try

m_AcadApp = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication

m_acadDoc = m_AcadApp.ActiveDocument

Return True

Catch ex As Exception

Return False

End Try


End Function



///then finalize - i'm wondering if releasing the document is crashing acad?

Protected Overrides Sub Finalize()


m_util = Nothing



m_acadDoc = Nothing

m_acadApp = Nothing

MyBase.Finalize()

End Sub


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the Autocad object library to get data from an autocad drawing Tom Ross Microsoft Access Form Coding 0 19th Oct 2005 10:15 PM
edit an autocad r14 <embed> object to open in autocad 2000 =?Utf-8?B?RGVyZWs=?= Microsoft Excel Misc 0 20th Jan 2005 09:51 PM
acad won't run on XP! Lloyd Windows XP General 4 2nd Jan 2005 09:43 AM
Anyway to run Dos version of Acad in XP ? Walt Mather Windows XP General 1 10th Oct 2003 01:03 PM
Compatibility w/ ACAD DAN Windows XP General 1 1st Oct 2003 03:05 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:33 PM.