Aller au contenu

Problème inscription Poplist


Guillaume05

Messages recommandés

Bonjour ou Bonsoir,

Je demande votre aide, car je coince sur les différents liens entre ma boite de dialogue et mon LISP.

Ma société m'a demandé de créer une boite de dialogue pouvant créer une bulle de détails incorporant différents éléments de bloc suivant un ordre prédéfini.

Et je coince au démarrage de mes différentes poplist.

J'aimerai inscrire une liste de nom depuis mon lisp, pour quelle vienne apparaitre dans ma boite de dialogue à l'emplacement prévue. (lien clé)

Pouvez vous m'aider?

 

Boite de dialogue

 

: dialog {

label = "Details";

:row {

 

:boxed_column {

label = "Visualisation";

 

:row {

alignment = center;

:image {

key = "imagndeux";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

}

 

:row{

alignment = center;

:image {

key = "imagnun";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

}

 

 

:row{

alignment = center;

:image {

key = "imagodeux";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

 

:image {

key = "imagoun";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

 

:image {

key = "imagc";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

 

:image {

key = "imageun";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

 

:image {

key = "imagedeux";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

}

 

:row{

alignment = center;

:image {

key = "imagsun";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

}

 

:row{

alignment = center;

:image {

key = "imagsdeux";

width = 6;

height = 3;

aspect_ratio=1;

fixed_height=true;

fixed_width=true;

}

}

}

 

label = "Element" ; //give it a label

 

:boxed_column { //define boxed_column

label = "Elements" ; //give it a label

 

: popup_list { //define popup list

label = "C"; //give it a label

key = "elc"; //give it a name

value = "20" ; //initial value

} //end list

 

: row { //define row

: popup_list { //define popup list

label = "E1"; //give it a label

key = "eleun"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_E1"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "O1"; //give it a label

key = "eloun"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_O1"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "N1"; //give it a label

key = "elnun"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_N1"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "S1"; //give it a label

key = "elsun"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_S1"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

// ---------------------------------------------------------------------------------

 

: row { //define row

: popup_list { //define popup list

label = "E2"; //give it a label

key = "eledeux"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_E2"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "O2"; //give it a label

key = "elodeux"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_O2"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "N2"; //give it a label

key = "elndeux"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_N2"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

: row { //define row

: popup_list { //define popup list

label = "S2"; //give it a label

key = "elsdeux"; //give it a name

value = "20" ; //initial value

} //end list

:toggle { //define toggle

key = "tog_S2"; //give it a name

label = "CBM"; //give it a label

} //end toggle

} //end row

 

 

} //end boxed_column

} //end row

 

ok_cancel ;

} //end dialog

//DCL CODING ENDS HERE

 

 

LISP

 

(defun C:TEST_DCL1 ()

 

;;;******************************************************************************************************************

 

(setq names '("Ventouse" "Croissement" "Elément Gauche" "Elément Haut" "Elément Droit" "Elément Bas"))

 

;;;******************************************************************************************************************

 

(setq dcl_id (load_dialog "test_dcl1.dcl"))

 

(if (not (new_dialog "test_dcl1" dcl_id))

(exit )

);if

 

;;;******************************************************************************************************************

 

(start_list "elc")

;open the list box

 

(mapcar 'add_list names)

;add the names to the list box

 

(end_list)

;end the list box

 

(set_tile "elc" "0")

 

;;;******************************************************************************************************************

 

(action_tile

"accept"

 

(setq index (atof (get_tile \"elc\")))

 

(done_dialog) (setq userclick T)"

 

);action tile

 

(action_tile

"cancel"

;if cancel button pressed

 

"(done_dialog) (setq userclick nil)"

;close dialog, lower flag

 

);action_tile

 

;;;******************************************************************************************************************

 

(start_dialog)

(unload_dialog dcl_id)

 

(princ)

 

);defun

(princ)

;AUTOLISP CODING ENDS HERE

test_dcl1.dcl

test_dcl1.lsp

Bureau d'Études Électricité

AutoCAD 2018 - DIALux

Fanatique de moto... V

Lien vers le commentaire
Partager sur d’autres sites

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant
×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer. Politique de confidentialité