mthomas
Joined: 12 Aug 2005
Posts: 2
|
Posted:
Mon Aug 15, 2005 12:37 pm Post subject:
Runtime error 1001 with AttachTo |
|
|
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
|
|