Hi all,
In my move from V7 -> V8 I'm in the process of changing mdlScan_* to mdlScanCriteria_*. I seem to have a bit of a problem with setting ranges to scan. The data that this app uses is a series of lines that run either top left down to bottom right or bottom left to top right, as in this case. Each line is made up of a series of line elements, not a line string, . interspersed with cells. Each line is "joined " using graphic groups. What I need to be able to do is select a part of the line, via mouse, somewhere around the orange circle, and then have the scanner give me all that comes after, the three elements that have the green crosses. At the moment, the scanner returns nothing.
What I have done is when the user selects an element is that I grab the range for the mouse selected element and use range.org.x as the x start point. I then set the corresponding Y start value to be 0x80000000, what I believe to be the bottom of the drawing plane. I then set the diagonal of the range to be 0x7fffffff, the upper right corner of the drawing plane. I then run the scan and it returns everything that has the appropriate GG, to the right of the range.org.x point, as shown by the yellow - or at least it should.
The code for setting up the range is:
rangeToCheck.org.x=scanRange->org.x;
rangeToCheck.org.y=(double)0x80000000;
rangeToCheck.org.z=0;
rangeToCheck.end.x=(double)0x7fffffff;
rangeToCheck.end.y=(double)0x7fffffff;
rangeToCheck.end.z=0;
mdlCnv_dRangeToScanRange(&myScanRange,&rangeToCheck);
mdlScanCriteria_setRangeTest(scanCriteria,&myScanRange);
As I mentioned before, scanRange comes from grabbing the range of the element that was mouse selected. There could be anything wrong in here as I'm a bit mixed up regarding ULong Vs double, do I need to convert to scan range etc etc. It should be noted that if I disable the range check and then select an element, the scanner will return all of the elements that belong to that GG. The problem arises when I attempt to implement range checking for the scanner.
Any thoughts on how to fix up the range problem would be greatly appreciated,
Andrew