My Program works on QCAD 3.16.7 but does not work on QCAD/CAM 3.20

Discussion forum for C++ and script developers who are using the QCAD development platform or who are looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files, scripts and screenshots.

Post one question per topic.

Post Reply
pietro_72_
Full Member
Posts: 81
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

My Program works on QCAD 3.16.7 but does not work on QCAD/CAM 3.20

Post by pietro_72_ » Tue Jun 05, 2018 9:32 pm

Ciao

Ieri ho acquistato QCAD/CAM 3.20 e ho provato a copiare un i file di un mio programma dalla cartella QCAD\scripts\Misc\MiscDraw\OrthogonalProjections\.... di QCAD 3.16.7 ,usato in precedenza (in cui il programma in costruzione funzionava correttamente), nella cartella QCADCAM\scripts\Misc\MiscDraw\OrthogonalProjections\.... ma il programma non funziona, si vede solo l'icona e non si apre la barra con i pulsanti ecc, ho notato che nella cartella QCADCAM\scripts\ di QCAD/CAM 3.20 mancano vari file e cartelle che c'erano nella precedente versione, probabilmente il mio programma non funziona perchè non trova alcuni di questi file.

c'è qualche possibiltà di farlo funzionare senza stravolgere troppo il codice?

allego file zip contenente i files del programma


google translation


Hello

Yesterday I purchased QCAD/CAM 3.20 and I tried to copy a file of my program from the QCAD\scripts\Misc\MiscDraw\OrthogonalProjections\.... folder of QCAD 3.16.7, used previously (in which the program in construction worked properly), in the QCADCAM\scripts\Misc\MiscDraw\OrthogonalProjections\.... folder but the program does not work, you only see the icon and does not open the bar with the buttons etc., I noticed that in the QCADCAM\scripts\ folder QCAD/CAM 3.20 are missing several files and folders that were in the previous version, probably my program does not work because it does not find some of these files.

is there any possibility of making it work without upsetting the code too much?

I attach zip file containing the program files
Attachments
OrthogonalProjections.zip
(13.6 KiB) Downloaded 504 times

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

Re: My Program works on QCAD 3.16.7 but does not work on QCAD/CAM 3.20

Post by andrew » Tue Jun 05, 2018 9:58 pm

Starting with QCAD 3.20.1, all scripts are compiled into plugins and no longer available on disk.

Most likely you just have to adjust at least one include path:

Replace:
include("../../../Draw/Polyline/Polyline.js");

With:
include("scripts/Draw/Polyline/Polyline.js");

The latter can be found by QCAD (as compiled resource inside the plugin). The first will look on disk, relative to the path of your own script which fails.

As always when developing scripts: be sure to launch QCAD from a terminal and check for errors / script exceptions on the terminal.


deepl translation

A partire da QCAD 3.20.1, tutti gli script sono compilati in plugin e non sono più disponibili su disco.

Molto probabilmente è sufficiente regolare almeno un percorso di inclusione:

Sostituire:
include("../../../Draw/Polyline/Polyline.js");

Con:
include("scripts/Draw/Polyline/Polyline.js");

Quest'ultima può essere trovata da QCAD (come risorsa compilata all'interno del plugin). Il primo apparirà su disco, in relazione al percorso del proprio script che fallisce.

Come sempre quando si sviluppano script: assicurarsi di lanciare QCAD da un terminale e controllare se ci sono errori o eccezioni di script sul terminale.

pietro_72_
Full Member
Posts: 81
Joined: Fri Apr 17, 2015 6:40 am
Location: http://creativitainformaticart.altervista.org

Re: My Program works on QCAD 3.16.7 but does not work on QCAD/CAM 3.20

Post by pietro_72_ » Tue Jun 05, 2018 10:52 pm

thanks, it works now

Post Reply

Return to “QCAD Programming, Script Programming and Contributing”