I've been trying to write a script for the past few days but can't seem to get it done. Here's what I have right now:
Code: Select all
include("simple.js");
openFiles(['C:/Users/K/Documents/plate.dxf'])
var doc = getDocument();
var selection = doc.selectAllEntities()
- open a file (preferably as an argument when calling it from the terminal)
- Select all the entities from the drawing
- Check for duplicates
- Delete the duplicates
- Return the total length of the remaining entities.
I've been able to do this using the command box at the bottom of QCad, but can't seem to get it done with a script.
Scowering the documentation and this forum has gotten me a bit further but I'm stuck.
Could anyone point me in the right direction?