AttachedDrawing.SaveNewObjs method

AutoCAD Map 3D ActiveX

AttachedDrawing.SaveNewObjs method

Saves newly created objects to memory.

SaveNewObjs(IdArray As Variant) As Boolean

Returns True on success.

IdArray

IDs of the objects to save as an array of Longs.

Note Because this method saves only to memory and not to disk, use the AttachedDrawing.Save method afterward to make the changes persistent.

The following example saves newly created objects.

Dim amobj as AcadMap

Dim pobj As AutoCADMap.Project

Dim dsobj as DrawingSet

Dim adobj as AttachedDrawing

Dim retval as Boolean

Set amobj = acadApp.GetInterfaceObject("AutoCADMap.Application")

Set pobj = amobj.Projects(ThisDrawing)

Set dsobj = pobj.DrawingSet

Set adobj = dsobj.Item(5)

retval = adobj.SaveNewObjs(12345)

If retval = True Then

 MsgBox "New object saved to memory."

Else

 MsgBox "New object not saved to memory."

End If