VCOM:VectorWorks:ISDK::NextDataObject
.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Description
namespace VectorWorks
Member of VCOM:VectorWorks:ISDK
Similar to FindDataObject, but begins searching at the specified object. If you need to find all of several instances attached to a single object, use this loop:
for (Handle ao = FindDataObject(cbp, owner, myTag), nextAux = NextObject(cbp, ao);
ao != nil;
ao = NextDataObject(cbp, nextAux, myTag), nextAux = ao ? NextObject(cbp, ao) : nil)
...
You may perform any operation you need on ao inside the loop, including deleting it.
Note that careless use of NextDataObject may send you into an infinite loop. Consider the following:
for (Handle ao = FindDataObject(cbp, owner, 'BLAH'); ao != nil; ao = NextDataObject(cbp, ao, 'BLAH'))
...
If the initialization step (ao = FindDataObject(cbp, owner, 'BLAH')) returns an object, this loop will never terminate. Because the NextDataObject call starts searching at an object already known to match, it will keep returning the object ao forever.
virtual MCObjectHandle NextDataObject(
MCObjectHandle start,
OSType tag)
Parameters
MCObjectHandle start No information available. OSType tag No information available.
Return Value
Version
Availability: from Vectorworks 2009