How do i use Draw > Polyline > Create from Selected Entities in script

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
Ewald Moitzi
Newbie Member
Posts: 5
Joined: Tue Jul 10, 2018 10:09 am

How do i use Draw > Polyline > Create from Selected Entities in script

Post by Ewald Moitzi » Wed Jan 09, 2019 12:18 pm

Hello,

is it possible to call the 'Create from Selected Entites' function for Polylines in a script? I've searched the docs and only found RPolyline::appendShapeAuto, which creates only a single polyline.

I want to identify all shapes that are not closed once converted to a polyline, so if there is a better solution for this, any hints would be greatly appreciated.

Thanks,
Ewald

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

Re: How do i use Draw > Polyline > Create from Selected Entities in script

Post by andrew » Thu Jan 10, 2019 11:26 am

Code: Select all

include("scripts/Pro/Draw/Polyline/PolylineFromSelection/PolylineFromSelection.js");

PolylineFromSelection.autoJoinSegments(documentInterface, tolerance, this);
Note that this is not part of the public QCAD API but part of the QCAD Professional plugin. This might change / break in future versions.

Post Reply

Return to “QCAD 'How Do I' Questions”