Jump to content

AutoCAD Activate document problem


Recommended Posts

Posted

I am using AutoCAD full version in my system.I have kept 2 or more AutoCAD drawings minimized. I will select a drawing from vb. I want to insert a drawing to the required AutoCAD drawing which has kept minimized(that is among that 3 drawing I will choose an AutoCAD drawing to which I will insert the selected drawing from vb). I am using lisp code for inserting drawing. From vb I want to select the required AutoCAD file and insert. But every time it is inserting to the first drawing which I have accessed first frm vb6.

Posted

I think the title for your thread is a bit confusing. You're not trying to activate a document as much as you are trying to insert a drawing into another AutoCAD drawing that is open but minimized. Is that correct?

Posted

For example I have kept 2 autocad windows minimized,in each window kept 2 drawings. On click of the any one drawing the path of the drawing should come to a textbox.

I am using the following code

On Error Resume Next
       Set acadapp = GetObject(, "AutoCAD.Application")
       If Err Then
           Set acadapp = CreateObject("AutoCAD.Application")
           Err.Clear
       End If
Dim strWorkbkName1 As String
strWorkbkName1 = acadapp.ActiveDocument.FullName
Text3.Text = strWorkbkName1

But every time it is taking the first opened window active document ,which I have opened first.it is not showing the second window.Can anyone tell me what is the error in this code.

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...