I tried:
Code: Select all
include("scripts/Select/SelectRectangle/SelectRectangle.js");
var d = new RDocument(new RMemoryStorage(), new RSpatialIndexNavel());
var di = new RDocumentInterface(d);
if (di.importFile(inFile) != RDocumentInterface.IoErrorNoError) {
di.destroy();
print("Cannot import file:", inFile);
return 1;
}
var ev = new SelectRectangle();
ev.setDocumentInterface(di);
ev.crossSelection = true;
ev.point1 = new RVector(0, 0);
ev.point2 = new RVector(3000, 200);
ev.selectEntities();
at the selectEntities() line."TypeError: Result of expression 'doc' [undefined] is not an object."
What is the correct way to achieve the selection with cross selection enabled?