Get selected polyline object's indexes.
int GetInternalSelection( vector<int> & vSelection )
returns negative number if invalid case; return 0 if not found, otherwise return the number of selected polyline object.
EX1
void GetInternalSelection_ex1() { //Assumes current project has some polylines in PolyPolylineGraphObject selected(you can select multiple polylines by shift key) foreach(OriginObject obj in Selection.Objects) { PolyPolylineGraphObject plobj; plobj = obj; if( !plobj ) continue; vector<int> vSelection; int nRet = plobj.GetInternalSelection(vSelection); if(nRet > 0) out_str("select:"); for(int ii = 0; ii < nRet; ii++) printf("%d ", vSelection[ii]); } }
origin.h