Scripting for DraftSight

Hi all

I'd like to know if it's possible to create a script for DrafSight that would allow you to open a file, print it, close it and then start again with other files.

In fact, my problem is that the script stops as soon as I close a file with the "_close" command.

I could keep all the files open and close them by the "_closeall" command after a "_Saveall" command at the end but the problem is that I could have a lot of files open at the same time and therefore crash DraftSight.

Another solution would be not to work in multi-window as the SDI variable allows in Autocad.

Is there a possibility of being able to open only one plan at the same time???

Thank you for your help.

 

Gilbert

1 Like

Hello

I had already tested the DraftSight scripts a few years ago, but without success. I'm looking to see if there's anything new.

1 Like

A priori same problems here and no solution:

http://www.eng-tips.com/viewthread.cfm?qid=315908

http://www.eng-tips.com/viewthread.cfm?qid=330667

 

1 Like

Otherwise, see this technique to print in bulk:

http://www.cadoasis.com/batch-print/

And I just saw that the new 2015 version has a batch print function but only for the PRO version (you can have a 30-day evaluation for free):

Batch Printing: Send a set of drawings and Sheets to printers in a batch job. Users can save batch print jobs to Batch Print List (*.bpl) files for subsequent use.

http://blogs.solidworks.com/solidworksblog/2014/01/draftsight-v1r5-0-includes-new-features-for-free-enterprise-and-professional-versions.html

 

A priori it is possible with AutoCAD Design Review which is free plus the plug-in to print in bulk:

http://usa.autodesk.com/design-review/

http://www.autodesk.co.uk/adsk/servlet/mform?siteID=452932&id=8995092&validate=no

 

Hello

For this, you need the Draftsight Pro or Premium, the free version does not allow it.

@+

@Coyotte: you can make scripts with the free version, but you don't have access to LISP programming!

1 Like

@.PL

Ok I didn't know that.

Thank you

 

@+

1 Like

Hi all

Thank you for these answers, unfortunately it doesn't solve my problem.

I see that my problem is known and that there is no solution, especially since my problem is not limited to multiple printing but in other cases, I have to open a series of planes, create DXFs or add an anotation before printing...

As I said, the only solution is to keep the plans open, save them and close them all at the same time, unfortunately, by doing this, I fear the risk of crashing.

Thank you anyway for your help.

Gilbert

With DraftSight indeed. The free version is limited.

Another solution would be to use FREECAD which is also free to do this:

http://www.freecadweb.org/wiki/index.php?title=Macros

Hello everyone and thank you for your help.

My problem was that the script would stop after the "_close" statement that closed the DWG file.

I solved my problem by creating a main script that initiates the execution of secondary scripts.

Example of the content of the main script:

filedia N
_loadscript "c:\Mes_Scripts\Script1.scr"
_loadscript "c:\Mes_Scripts\Script2.scr"
_loadscript "c:\Mes_Scripts\Script3.scr"
_loadscript "c:\Mes_Scripts\Script4.scr"

...

filedia O

 

In the secondary scripts, I put the instructions for opening a file, printing, creating the DXF file, etc.

They all end with the instruction "_close"

When a secondary script finishes running, the main script starts running the next secondary script, and so on.

The primary and secondary scripts are created completely automatically by a Visual Basic procedure.

I hope that this way of doing things can inspire you.

Gilbert

1 Like
Clever indeed, we can have an example of the main script plus 1 or 2 secondary ones to test and see exactly how it's done?

Clever indeed, we can have an example of the main script plus 1 or 2 secondary ones to test and see exactly how it's done?