QCAD3 quits on startup script, no error msg.

If you are having problems with QCAD version 3, post here. Please report bugs here.

Moderator: andrew

QCAD3 quits on startup script, no error msg.

Postby LeoP » Sat Mar 01, 2014 4:00 pm

Using WInXP, fully up-to-date.

Have QCAD3 installed in D:\QCAD Professional\QCAD 3.4.4 and it worked just fine with the quickstart from the desktop.
Until I wanted to add a default template, now it quits immedeately after starting up...

I followed the recipy from viewtopic.php?p=5755#p5755, which resulted for me in:
Code: Select all
var mainWindow = RMainWindowQt.getMainWindow();
var doc = mainWindow.getDocument();
var di = mainWindow.getDocumentInterface();

di.importFile("_layerList.dxf");
di.regenerateScenes();
di.autoZoom();
doc.setFileName("");

This scriptfile is called GetLayerList.js and is located in the D:\QCAD Professional\QCAD 3.4.4\scripts directory.
The desired template is located in the D:\QCAD Professional\QCAD 3.4.4\libraries\templates directory.

I changed the Target: field in the quickstart link to "D:\QCAD Professional\QCAD 3.4.4\qcad.exe" -exec GetLayerList.js and expected to see a blank drawing with pre-defined layers; intead the program terminates without any warnings or messages...

I assume (dangerous, I know) that I do something not precisely right, but the what and how elude me.
LeoP
Active Member
 
Posts: 35
Joined: Sat Feb 13, 2010 12:01 pm

Re: QCAD3 quits on startup script, no error msg.

Postby andrew » Mon Mar 03, 2014 9:13 am

This procedure is outdated.

Please use the new File > New from Template tool instead to start a drawing based on one of the templates in libraries/templates
User avatar
andrew
Site Admin
 
Posts: 2600
Joined: Fri Mar 30, 2007 6:07 am

Re: QCAD3 quits on startup script, no error msg.

Postby LeoP » Mon Mar 03, 2014 4:25 pm

Any chance of a user-defined template being selected as default?
After all, that was what I was trying to achieve...
LeoP
Active Member
 
Posts: 35
Joined: Sat Feb 13, 2010 12:01 pm

Re: QCAD3 quits on startup script, no error msg.

Postby J-J » Mon Mar 03, 2014 11:45 pm

Hi,
It works for me, every time I launch QCAD, my custom drawing is opened:
Both, the file to open and the "file-name.js" reside in the QCAD main directory. This is invoke within the desktop shortcut, in my case: "C:\Program Files (x86)\QCAD-3.4.6\QCAD\qcad.exe" -exec .\template.js
And I observed, that if the command line cannot find the script, QCAD will terminate.
Hope this helps.
JJ
User avatar
J-J
Moderator
 
Posts: 175
Joined: Tue Mar 24, 2009 9:48 pm

Re: QCAD3 quits on startup script, no error msg.

Postby LeoP » Tue Mar 04, 2014 1:25 am

I found a solution for my problem: the Target: field must include a path to the scriptfile following standard Windoze path syntax; so that QCAD can find it.
The path to the template in the script file must follow the linux syntax, i.e. use forward slashes instead of the Windoze backward (no pun intended) ones.
The location of the two files (script and template) is arbitrary, as long as the correct path name and syntax is used.
LeoP
Active Member
 
Posts: 35
Joined: Sat Feb 13, 2010 12:01 pm


Return to QCAD 3 Troubleshooting and Problems

Who is online

Users browsing this forum: No registered users and 1 guest