Open dwg file from code

Open dwg file from code

OceanaPolynom
Advocate Advocate
1,012 Views
2 Replies
Message 1 of 3

Open dwg file from code

OceanaPolynom
Advocate
Advocate

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

0 Likes
1,013 Views
2 Replies
Replies (2)
Message 2 of 3

Alfred.NESWADBA
Consultant
Consultant

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
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 3

OceanaPolynom
Advocate
Advocate

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

 

John

0 Likes