Opening a new DWG

#1
Hello,

I'm trying to open a new DWG from inside IntelliCAD (using VBA) and from outside (using Automation from VB).

In both cases, I'm trying to do the following:

Dim iCAD As IntelliCAD.Application
iCAD = New IntelliCAD.Application()

iCAD.Visible = True
iCAD.Documents().Open("C:\Temp\MyLib\Sample.dwg", False)

Then I receive "Unspecified Error" message and nothing happens!

Am I missing something?
Kindest Regards,
Fernando.

#2
fpmalard,

This is straight fro the Help in IntelliCAD

Private Sub OpenMethod()
' The following example opens "C:\package.dwg" file.
' You may need to change the drawing path and name to reflect a valid
' IntelliCAD drawing on your system.

Documents.Open ("C:\package.dwg")

End Sub

Your "iCAD.Documents()" appear to treat the Documents as an array.

The "Documents" are a collection of Document objects.

I have tried the code and it is working fine.




------------------
Regards
John Finlay

#3
Hi John,

I have found that the problem is related to DWG file. It was created in AutoCAD 2004 and due that, can not be opened on IntelliCAD version I'm using.

As this Open method does not throw any erros message I was not sure about what is happening.

Thanks.
Fernando.

#4
fpmalard,

I understand that IntelliCAD 5 is about to be released and this opens and saves ACAD 2004 drawings.



------------------
Regards
John Finlay