AttachedDrawing.CountInSSet method

AutoCAD Map 3D ActiveX

AttachedDrawing.CountInSSet method

Counts the objects in a save set.

CountInSSet(Qualifier As ESaveSetObjectType) As Long

Returns the count.

Qualifier

The types of objects you want to count, one or more ESaveSetObjectType constants.

You can combine constants to specify more than one type. For example, to get the number of queried objects that have not been deleted plus the number of new objects, the Qualifier argument is kQueriedExisted + kNewlyCreated.

The following example gets the number of queried objects that have been deleted.

Dim amobj as AcadMap

Dim pobj As AutoCADMap.Project

Dim dsobj as DrawingSet

Dim adobj as AttachedDrawing

Dim objnum as Long

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

Set pobj = amobj.Projects(ThisDrawing)

Set dsobj = pobj.DrawingSet

Set adobj = dsobj.Item(5)

objnum = adobj.CountInSSet(kQueriedErased)

MsgBox "The number of locked objects is: " & CStr(objnum)