Using dimensions in VBA

Hi, I'm trying to get the dimensioning methods to work in IntelliCad2000 when I use Visual Basic. The code is as follows:---------Sub CommandButton2_Click() Dim objICad As IntelliCAD.Application Dim pt1 As IntelliCAD.Point Dim pt2 As IntelliCAD.Point Dim pt3 As IntelliCAD.Point Dim meas As IntelliCAD.DimAligned Set objICad = Application Set pt1 = objICad.Library.CreatePoint(0, 0) Set pt2 = objICad.Library.CreatePoint(45, 45) Set pt3 = objICad.Library.CreatePoint(20, 40) Set line1 = objICad.ActiveDocument.ModelSpace.AddLine(pt1, pt2) Set meas = objICad.ActiveDocument.ModelSpace.AddDimAligned(pt1, pt2, pt3) End Sub---------The AddLine executes OK, but the AddDimAligned generates an 445 error 'Object doesn't support this action'What do I do wrong??