Preselection behavior

Hi guys,

I found weird behavior in the preselection, here is my codes:

CRhinoGetObject sel_UnfoldObj;

sel_UnfoldObj.EnablePreSelect(); //TRUE, TRUE);
sel_UnfoldObj.SetCommandPrompt( L"Select the sheet metal model: " );
sel_UnfoldObj.SetGeometryFilter( CRhinoGetObject::surface_object); // for the time being, don't use this | CRhinoObject::mesh_object );
sel_UnfoldObj.GetObjects( 0, 0 );

int dx = sel_UnfoldObj.ObjectCount();
CRhinoCommand::result re = sel_UnfoldObj.CommandResult();

if( sel_UnfoldObj.CommandResult() != CRhinoCommand::success )
  return sel_UnfoldObj.CommandResult();

Now before I issue the command in the command line “mycommand”, I have already select many one or many objects, then I issue “mycommand”, it ends up with asking for selecting the model (command prompt to ask me to select), then I hit return, the selected object is “dx = 0” and the returned status is “canel” (value 1).
Where are my preselected objects?

Is anything wrong with my codes?

Thanks for help.


I have figured out my mistake. Sorry for this post.