What is your "Object"?
Did you look at the example code in the LDT Developer help?
Here's a snip......
Sub Example_Add_CogoPoints()
' This function adds a new CogoPoint to the CogoPoints collection.
Dim cogoPnts As AeccCogoPoints
Dim newCogoPnt As AeccCogoPoint
Set cogoPnts = AeccApplication.ActiveProject.CogoPoints
' Get a point
Dim newPnt As Variant
newPnt = ThisDrawing.Utility.GetPoint(, "Select point location: ")
' Add CogoPoint
Set newCogoPnt = cogoPnts.Add(newPnt, kCoordinateFormatXYZ)
MsgBox "The Number for the new CogoPoint is: " & newCogoPnt.Number,
vbInformation, "Add Example"
End Sub
wrote in message news:5425140@discussion.autodesk.com...
I am getting error with the code below.
Ultimately, I would like to add cogo points, by entering them in command
line, in the database as well as in the drawing.
Can anyone correct my code?
Thanks.
Sub points_add()
Dim Coordinates(0 To 2) As Double
Dim newpoint As AeccCogoPoint
Coordinates(1) = ThisDrawing.Utility.GetDistance(, "ENTER NORTHING: ")
Coordinates(0) = ThisDrawing.Utility.GetDistance(, "ENTER EASTING: ")
Coordinates(2) = ThisDrawing.Utility.GetDistance(, "ENTER ELEVATION: ")
newpoint = Object.Add(Coordinates, kCoordinateFormatENZ)
End Sub
LDD 2006
Civil Design 2006
Windows 2000