Visual Basic Customization

Reply
Valued Contributor
OceanaPolynom
Posts: 79
Registered: ‎12-22-2008
Message 1 of 3 (244 Views)

Open dwg file from code

244 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*
Alfred.NESWADBA
Posts: 8,890
Registered: ‎06-29-2007
Message 2 of 3 (241 Views)

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
OceanaPolynom
Posts: 79
Registered: ‎12-22-2008
Message 3 of 3 (230 Views)

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community