VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open dwg file from code

2 REPLIES 2
Reply
Message 1 of 3
OceanaPolynom
476 Views, 2 Replies

Open dwg file from code

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

Tags (2)
2 REPLIES 2
Message 2 of 3

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 ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 3

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

 

John

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost