Special OpenFile and Special NewFile needed

This forum is for 'Work-in-Progress' QCAD user developed script Add Ons and Plug-ins.

Please use this forum to request/submit your script Add-Ons & Plug-in idea's.

Moderators: andrew, Husky, J-J

Post Reply
blumi
Newbie Member
Posts: 6
Joined: Sat Jan 18, 2014 10:17 am

Special OpenFile and Special NewFile needed

Post by blumi » Mon Jun 29, 2015 1:46 pm

Hi on the forum,

last week I started my working with "QCad". Unfortunately
I'm not very familiar with java script language. But I'm willing
to learn. Today I have a special request/ idea for two scripts.

1. We have a drive on our network where app. 8000 small
dwg-files are stored. Sometimes we have to change
a file from this directory. Because of the large number
of files the File->Open dialog is a bit slow. My idea now
is a script Open->Filename. After clicking a window
pops up where I can insert the filename e.g. "2569"
the format ist fixed as *.dwg and the path can also
be fixed e.g. "V:\dwg\". After inserting the filename
and click on OK or press return, the file should open.

2. Sometimes we have to change a existing file an save
it as a new file. Therefore there is a file called "dwgnum.dat"
where the number of last saved file is stored. When I
call the script, it should open the dwgnum.dat copy the
number+1, save the opened file with that number
as filename and write the new "last number" to the
"dwgnum.dat".

Has anyone an idea how I can do this in QCad?

Every help is appreciated.

Thanks for your help in advance.

Greetings
blumi

User avatar
hungerburg
Premier Member
Posts: 160
Joined: Fri May 28, 2010 7:35 pm

Re: Special OpenFile and Special NewFile needed

Post by hungerburg » Tue Jun 30, 2015 11:47 am

Hello blumi, what you describe can be done with custom scripts.

A good place to start is the tutorial section of the reference documentation here - http://www.qcad.org/doc/qcad/latest/dev ... _bars.html

When you have your menu up you can tweak the "action" to do your things: open dialogs, ask questions, open files, save files, you name it.

Peter

Post Reply

Return to “QCAD 'Script Add-On & Plug-in challenge' - Work in Progress”