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