i have autocad2007 and autocad LT 2006 in my system i want to open dwg files in autccad Lt 2006 using vb.6 code.
i want to modify the above code and open dwg drawings in Lt
above code will open drawing in autocad2007![]()
Dim DwgName As String On Error Resume Next Set acadApp = GetObject(, "AutoCAD.Application") If Err Then Set acadApp = CreateObject("AutoCAD .Application") Err.Clear End If ' If Right(App.Path, 1) = "\" Then ' DwgName = "C:\13027167-GX2.dwg" ' Else ' DwgName = "C:\13027167-GX2.dwg" ' End If Set acadDoc = acadApp.ActiveDocument If acadDoc.FullName <> DwgName Then acadDoc.Open DwgName End If Dim str As String, str1 As String str1 = "_-insert" & vbLf & """" & "C:\14001120-AA8232-AC8232-AZ665.dwg" & """" & vbLf & "0,0,0" & vbLf & vbLf & vbLf & vbLf & "z" & vbLf & "a" & vbLf 'str = "dwin" & vbLf acadDoc.SendCommand str1 ' acadDoc.SendCommand str acadApp.Visible = True


Reply With Quote
