Select with polygon

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
RR88
Full Member
Posts: 51
Joined: Sun Apr 29, 2018 7:04 am
Location: Leinefelde

Select with polygon

Post by RR88 » Tue Aug 25, 2020 3:39 pm

Is 'Select all entities inside a polygon' available in the API?
Arch Linux, QCad 3.22.0 Prof.

User avatar
andrew
Site Admin
Posts: 9058
Joined: Fri Mar 30, 2007 6:07 am

Re: Select with polygon

Post by andrew » Thu Aug 27, 2020 9:41 am

No.

However, you could trigger the interactive tool as shown in this example:

Code: Select all

include("scripts/Pro/Select/SelectPolygon/SelectPolygon.js");
var a = new SelectPolygon();
a.setDocumentInterface(getDocumentInterface());
a.pointList = [ new RVector(0,0), new RVector(50,0), new RVector(25,50) ];
a.crossSelection = false;
a.selectEntities();

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”