Jump to content

Open AutoCAD drawing


shamsam1

Recommended Posts

I have to opened dwg drawing from vb6 on click of a button. I am using the following code to open a dwg drawing and send command to commond prompt of autocad. But when I click on the command button once again, it is opening once again as new. But I want to activate the drawing which I have already opened and kept it minimized and pass once again command to command prompt.

 Dim doc As AcadDocument
Dim acadapp As Object
Set acadapp = CreateObject("AutoCAD.Application")
Set doc = acadapp.Documents.Open("c:\123.dwg")
str = "mycommand" & vbLf
doc.SendCommand str

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...