hello,
when i run a script with an 'if' loop in, everything goes right until the loop stop, then qcad crashes.
it crashes with linux too.
could you help?
below is the script file I used.
thanks
-----------------------------------------------------------------
function dialog() {
var dialog = new Dialog;
var doc = new Document;
dialog.caption = "distance pour le point 'next'";
dialog.title = "Distance et Degrés pour un point"
dialog.okButtonText = "Glop!";
dialog.cancelButtonText = "Pas glop!";
dis = new LineEdit;
dis.label = "distance pour le point 'next'";
dis.text = "0";
dialog.add(dis);
deg = new LineEdit;
deg.label = "degres pour le point 'next'";
deg.text = "0";
dialog.add(deg);
if (dialog.exec()) {
print("degres pour le point next =" + deg.text);
print("distance vers le point next =" + dis.text);
}
if (dis.text>0) {
print ("dialog ok");
}
else{
fin();
}
line();
var retdis = dis.text;
return retdis;
var retdeg = deg.text;
return retdeg;
}
function line() {
cenplus = 0+1;
doc = new Document;
var line, v1, v2;
v1 = new Vector(0,0);
v2 = new Vector(0,cenplus);
v2.rotate(0,0, -0.0174532925*deg.text);
v2.scale(0,0, dis.text);
line = new Line(doc, v1, v2);
doc.addEntity(line);
if (dis.text>0) {
print("line ok");
suivant();
}
}
function suivant() {
var view;
view = new View;
view.redraw();
view.zoomAuto();
if (dis.text>0) {
print ("suivant ok");
dialog();
}
else if (dis.text<1){
fin();
}
}
function fin() {
print("fin executée");
}
qcad crashes at the end of a loop (script)
If you are having problems with QCAD 2.1/2.2, post here. Please report bugs here.
Moderator: andrew
Return to “QCAD 2.1/2.2 Troubleshooting and Problems”
Jump to
- General
- ↳ Announcements
- ↳ Chat
- ↳ Site Feedback
- ↳ Pre-sales Questions
- ↳ Introduce Yourself
- QCAD Professional Version
- ↳ QCAD 'How Do I' Questions
- ↳ QCAD Suggestions and Feedback
- ↳ QCAD Voting Corner
- ↳ QCAD Troubleshooting and Problems
- ↳ QCAD Installation and Upgrades
- ↳ QCAD Programming, Script Programming and Contributing
- ↳ QCAD 'Script Add-On & Plug-in challenge' - Work in Progress
- ↳ Finished 'Ready to go' Scripts/Plug-in's
- ↳ QCAD Tips and Tutorials
- ↳ QCAD/CAM
- ↳ What do you use QCAD/CAM for?
- QCAD Community Edition
- ↳ QCAD Community Edition
- International Forums
- ↳ Français
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition (Version 3)
- ↳ Deutsch
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Italiano
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Español
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- ↳ Português
- ↳ QCAD Professional
- ↳ QCAD/CAM
- ↳ QCAD Community Edition
- QCAD Book
- ↳ QCAD - An Introduction to Computer-Aided Design
- ↳ QCAD - Una Introducción al Diseño Asistido por Ordenador
- ↳ QCAD - Eine Einführung in computerunterstütztes Zeichnen (CAD)
- QCAD Part Libraries
- ↳ General
- ↳ Creating DXF/DWG items
- ↳ Creating SVG items
- ↳ Meta Data
- dxflib
- ↳ dxflib Suggestions and Feedback
- ↳ dxflib 'How Do I' Questions
- ↳ dxflib Troubleshooting and Problems
- Archive
- ↳ vec2web Format Converter
- ↳ vec2web Suggestions and Feedback
- ↳ vec2web 'How Do I' Questions
- ↳ vec2web Troubleshooting and Problems
- ↳ QCAD Development
- ↳ Translations
- ↳ QCAD Professional (2.1/2.2)
- ↳ QCAD 2.1/2.2 Suggestions and Feedback
- ↳ QCAD 2.1/2.2 'How Do I' Questions
- ↳ QCAD 2.1/2.2 Troubleshooting and Problems
- ↳ QCAD 2.1/2.2 Installation and Upgrades
- ↳ QCAD 2.1/2.2 Developers
- ↳ QCAD Community Edition (2.0)
- ↳ QCAD Community 'How Do I' Questions
- ↳ QCAD Community Patches
- ↳ CAM Expert
- ↳ Announcement
- ↳ CAM Expert Suggestions and Feedback
- ↳ CAM Expert 'How Do I' Questions
- ↳ CAM Expert Troubleshooting and Problems
- ↳ Annonces
- ↳ Ankündigungen
- ↳ Annunci
- ↳ Noticias