Page 1 of 1

Opening a new DWG

Posted: Thu Sep 09, 2004 3:39 pm
by fpmalard
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.

Posted: Fri Sep 10, 2004 7:59 pm
by John Finlay
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

Posted: Sat Sep 11, 2004 9:22 am
by fpmalard
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.

Posted: Sun Sep 12, 2004 9:31 pm
by John Finlay
fpmalard,

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



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