On 11/07/2014 at 21:20, xxxxxxxx wrote:
^Is this code by Matthias broken now?
I'm pretty sure it worked for me properly in R12. But now that I'm using it in R13 it's not working correctly. I'm getting a jibberish point ID from it.
Maxon changed the GetRange() function in R13. They added another required parameter to it. And I'm wondering if that's why this code no loger works correctly?
This is how I'm using it in R13:
BaseObject *op = doc->GetActiveObject();
if (!op) return FALSE;
if (op->GetType() == Opolygon)
{
Neighbor n;
if (!n.Init(ToPoly(op)->GetPointCount(),ToPoly(op)->GetPolygonR(),ToPoly(op)->GetPolygonCount(),NULL)) return FALSE;
BaseSelect *esel = ToPoly(op)->GetSelectedEdges(&n,ToPoly(op)->GetEdgeS());
LONG seg=0,a,b,i;
while (esel->GetRange(seg++, MAXLONGl, &a, &b))
{
for (i=a; i<=b; ++i)
{
//
GePrint(LongToString(i));
}
}
BaseSelect::Free(esel);
}
MAXLONGl was added in R13. Is this causing my code to fail?
I'm writing an R13 plugin where I need to get the points in selected edges. And this is the only way I knew how to do it. But now it's not working anymore! 
-ScottA