From Vectorworks Developer
Revision as of 09:58, 16 January 2014 by Maarten (Talk | contribs)

Jump to: navigation, search

.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference


namespace VectorWorks

Member of VCOM:VectorWorks:ISDK

Calls action function (GS_ForEachObjectProcPtr) with env equal to actionEnv and h equal in turn to each object that matches the criteria specified by traverseWhat.

typedef void (*GS_ForEachObjectProcPtr)(Handle h, CallBackPtr cbp, void *env);
virtual void ForEachObject(
short traverseWhat,
GS_ForEachObjectProcPtr action,
void *actionEnv)


short traverseWhat Selector for traversing. See 'Remarks' secion.
GS_ForEachObjectProcPtr action Callback function while traversing.
void* actionEnv Data passed to the callback function while traversing.


The 'traverseWhat' parameter can be combination (bitwise or) of the following values:
enum {
	allSelected		= 0,  // all visible, selected objects;
	allEditable		= 1,  // all visible, unlocked objects on currently editable layers;
	allVisible		= 2,  // all selected and unlocked objects;
	allDrawing		= 3,  // all objects in the drawing on all layers, regardless of visibility, selection, or locked state;
	allSymbolDefs		= 4,  // all symbol definitions;
	allSelectedAndEditable	= 5,
	allObjects		= 6,  // all objects in the drawing and all symbol definitions
	descendIntoGroups 	= 32, // also process objects inside of qualifying groups;
	descendIntoAll 		= 64,
	descendIntoViewports 	= 128 // also process objects inside of qualifying groups and group-like objects (walls, sweeps, extrudes, etc.)


struct SMyData

void MyCallBack(Handle h, CallBackPtr cbp, void *env)
   SMyData* pEnv = (SMyData*) env;


void TraverseFunction()
   SMyData data;

   // will search only the layers
   gSDK->ForEachObject( allObjects, MyCallBack, & data );

   // will search inside groups
   gSDK->ForEachObject( allObjects | descendIntoAll, MyCallBack, & data );


Availability: from Vectorworks 2009
Personal tools

Advanced Search
See Also