Calling PickObject() from C++

CValue out;
CValueArray pick_args(2);

pick_args[0] = L"Pick an object";
pick_args[1] = L"Pick an object";
Application().ExecuteCommand( L"PickObject", pick_args, out);
CValueArray array = (const CValueArray &)out;				
LONG button = (LONG)array[0];
X3DObject pickedObject(array[2]);

Application().LogMessage( pickedObject.GetFullName() );

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s