QCAD3 quits on startup script, no error msg.

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
LeoP
Active Member
Posts: 38
Joined: Sat Feb 13, 2010 12:01 pm

QCAD3 quits on startup script, no error msg.

Post by 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 http://www.ribbonsoft.com/rsforum/viewt ... 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.

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

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

Post by 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

LeoP
Active Member
Posts: 38
Joined: Sat Feb 13, 2010 12:01 pm

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

Post by 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...

User avatar
J-J
Moderator
Posts: 502
Joined: Tue Mar 24, 2009 9:48 pm

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

Post by 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 Win7 pro-64

LeoP
Active Member
Posts: 38
Joined: Sat Feb 13, 2010 12:01 pm

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

Post by 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.

Post Reply

Return to “QCAD Troubleshooting and Problems”