var ids = doc.queryAllEntities();
var op = new RMixedOperation();
PolylineFromSelection.createPolyline(op, ids, document, new RVector(1.0e-3, 1.0e-3));
Obviously this doesn’t work as:
PolylineFromSelection there is no documentation for which method there are within the PolylineFromSelection object.
The arguments for such method and how to obtain the selection etc…
Could you please provide an example.
I couldn’t find anything om the documentation or in the forum
I found examples for PolylineFromSegments (which expects a single entity) but not for PolylineFromSelection.
Assuming, di is your RDocumentInterface, first, you need to select all entities you want to use as segments for the new polylines. E.g.:
di.selectAll();
This would be to use all entities.
Then, you can run:
var counter = PolylineFromSelection.autoJoinSegments(di, tolerance);
Where tolerance is the maximum gap allowed between segments to still join them into a polyline. The return value is the number of polylines created.
Please keep in mind that PolylineFromSelection is not part of the public API but part of the proprietary API of QCAD Professional. Feel free to call this from your script, but keep in mind that this API might change in a future version.