Visual Basic Customization

Visual Basic Customization

Reply
Valued Contributor
81 Posts
0 Kudos
Registered: ‎12-22-2008
Post 1 of 3

Open dwg file from code

260 Views, 2 Replies
12-14-2012 02:41 AM

Hello

I want to open a dwg file from code in my program.  I have a string variable containing the full path and file name.  I want to open the dwg file in an instance of Autocad that is already running, I don't want to open Autocad.  The program is written in VB 6.0.  Is this possible?

 

Thank you

John

*Expert Elite*
9,796 Posts
1,210 Kudos
Registered: ‎06-29-2007
Post 2 of 3

Re: Open dwg file from code

12-14-2012 03:07 AM in reply to: OceanaPolynom

Hi,

 

yes, is possible, use COM/ActiveX to get access to the running AutoCAD instance and start controlling it.

   Dim tAcadApp as AcadApplication   'or    as Object     if you use latebinding

   Set tAcadApp = getObject(,"AutoCAD.Application")

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Valued Contributor
81 Posts
0 Kudos
Registered: ‎12-22-2008
Post 3 of 3

Re: Open dwg file from code

12-14-2012 10:20 PM in reply to: Alfred.NESWADBA

Thanks for your reply.  I am finding out what this is meanwhile

 

John

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post