getting selected objects

Status
Not open for further replies.

bond

Usenet Archive
Joined
Jul 6, 2001
Messages
24
Reaction score
0
When I use mdlSelect_returnPositions(&Positions, &fileNums, &numSelected); to get the positions of the selected objects, the fileNums are coming out as zero no matter which reference file they are from. Can someone help me?
 
"bond" wrote:

When I use mdlSelect_returnPositions(&Positions, &fileNums, &numSelected); to get the positions of the selected objects, the fileNums are coming out as zero no matter which reference file they are from. Can someone help me?

I've used something like this many times with no problem:

ULong *filePos = NULL;
int *fileNum = NULL;
int i, nFound = 0;

mdlSelect_returnPositions (&filePos, &fileNum, &nFound);

for (i = 0; i < nFound; i++) {
MSElement el;
mdlElement_read (&el, *(i + fileNum), *(i + filePos)); }

if (filePos)
free (filePos);
if (fileNum)
free (fileNum);
 
Status
Not open for further replies.

Latest threads

Back
Top