Hi Everyone,
I am creating a new record and then attaching a polyline to it with the following code.
Dim acadApp As AcadApplication
Dim rec As Object 'ODRecord
Set acadApp = GetObject(, "AutoCAD.Application")
Set AcadMap = acadApp.GetInterfaceObject("AutoCADMap.Application ")
Set obdTable = AcadMap.Projects(0).ODTables.Item("ARCS")
Set rec = gOdTable.CreateRecord()
rec.AttachTo (arc.ObjectID)
' arc As AcadObject (polyline)
But the line:
rec.AttachTo (arc.ObjectID)
gives me the following error:
Runtime Error '1001':
AutoCad MAP error.
It does not happen all the time. It appears to be random.
I cannot determine the reason for it.
Has anyone seen this better or have any ideas of what I am doing wrong?
Thanks
Michael


Reply With Quote
