#1
|
|||
|
|||
lisp error
Hi everybody,
I get the following error when the macro gets aborted by (sd-abort-dialog) "LISP error: 0 is an undefined tag." How can I solve this? I realy don't know what this error means. This is the code: Code:
(in-package :conemoer) (use-package :oli) (sd-defdialog 'Conemoer :dialog-title "Cone-moer" :persistent-proposals t :variables '( (ASSEMBLY :multiple-items nil :modifies nil :initial-value nil :show-select-menu nil :title "Assembly/Buis" :after-input (if (sd-inq-part-p ASSEMBLY) (sd-set-variable-status 'NUMMER :visible t)) :promt-text "Selecteer de groepsassembly of de buis." :value-type :part-assembly) (GROEP :value-type :positive-number :prompt-text "Geef de groepsnummer in." :check-function #'(lambda (new-value) (if (>= new-value 1) :ok (values :error "Ingegeven groepsnummer klopt niet"))) :title "Groepsnummer") (NUMMER :value-type :positive-number :prompt-text "Geef de buisnummer in." :initial-visible nil :check-function #'(lambda (new-value) (if (>= new-value 1) :ok (values :error "Ingegeven buisnummer klopt niet"))) :title "Buisnummer") (NEXT :toggle-type :grouped-toggle :push-action (doit) :after-input (setf ASSEMBLY nil) :next-variable 'ASSEMBLY) ) :local-functions '( (doit () (if (sd-inq-assembly-p ASSEMBLY) (progn (setf buizen (sd-call-cmds (get_selection :focus_type *sd-part-seltype* :select :in_assembly ASSEMBLY :all_3d))) (setf TELBUIS 1) (dolist (obj buizen "done") (progn (setf ORIGINEEL (sd-inq-obj-basename obj)) (setf BUIS obj) (if (and (> GROEP 9) (> TELBUIS 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G~A-~A" GROEP TELBUIS))) ) (if (and (> GROEP 9) (<= TELBUIS 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G~A-0~A" GROEP TELBUIS))) ) (if (and (<= GROEP 9) (> TELBUIS 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G0~A-~A" GROEP TELBUIS))) ) (if (and (<= GROEP 9) (<= TELBUIS 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G0~A-0~A" GROEP TELBUIS))) ) (setf ASSYOBJ (sd-inq-parent-obj BUIS)) (if (equal ASSYOBJ nil) (setf PAD /) (setf PAD (sd-inq-obj-pathname ASSYOBJ)) ) (setf vlakken (sd-call-cmds (get_selection :focus_type *sd-plane-seltype* :select :selected_part BUIS :all_3d))) (setf TEL 0) (dolist (obj vlakken "done") (progn (setf VLAK obj) (setf HYDRAULIEKBUIS (sd-inq-obj-basename (sd-inq-parent-obj VLAK))) (setf cirkels (sd-call-cmds (get_selection :focus_type *sd-circle-3d-seltype* :select :by_face VLAK))) (setf R 0) (dolist (obj cirkels "done") (progn (setf CENTER (sd-circle-center (sd-inq-geo-props obj :dest-space :global))) (setf RAD (sd-circle-radius (sd-inq-geo-props obj :dest-space :global))) (setf P3 (sd-edge-start-pnt (sd-inq-edge-geo obj :dest-space :global))) (if (> RAD R) (setf R RAD) ) ) ) (programma) ) ) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/~A" PAD HYDRAULIEKBUIS))) (setf TELBUIS (+ 1 TELBUIS)) ) ) (if (> GROEP 9) (sd-call-cmds (change_name_pa :part_asmb ASSEMBLY :name (format nil "montage_leidinggroep~A" GROEP))) (sd-call-cmds (change_name_pa :part_asmb ASSEMBLY :name (format nil "montage_leidinggroep0~A" GROEP))) ) ) ) (if (sd-inq-part-p ASSEMBLY) (progn (setf ORIGINEEL (sd-inq-obj-basename ASSEMBLY)) (setf BUIS ASSEMBLY) (if (and (> GROEP 9) (> NUMMER 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G~A-~A" GROEP NUMMER))) ) (if (and (> GROEP 9) (<= NUMMER 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G~A-0~A" GROEP NUMMER))) ) (if (and (<= GROEP 9) (> NUMMER 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G0~A-~A" GROEP NUMMER))) ) (if (and (<= GROEP 9) (<= NUMMER 9)) (sd-call-cmds (change_name_pa :part_asmb BUIS :name (format nil "leiding-G0~A-0~A" GROEP NUMMER))) ) (setf ASSYOBJ (sd-inq-parent-obj BUIS)) (if (equal ASSYOBJ nil) (setf PAD "/") (setf PAD (sd-inq-obj-pathname ASSYOBJ)) ) (setf vlakken (sd-call-cmds (get_selection :focus_type *sd-plane-seltype* :select :selected_part BUIS :all_3d))) (setf TEL 0) (dolist (obj vlakken "done") (progn (setf VLAK obj) (setf HYDRAULIEKBUIS (sd-inq-obj-basename (sd-inq-parent-obj VLAK))) (setf cirkels (sd-call-cmds (get_selection :focus_type *sd-circle-3d-seltype* :select :by_face VLAK))) (setf R 0) (dolist (obj cirkels "done") (progn (setf CENTER (sd-circle-center (sd-inq-geo-props obj :dest-space :global))) (setf RAD (sd-circle-radius (sd-inq-geo-props obj :dest-space :global))) (setf P3 (sd-edge-start-pnt (sd-inq-edge-geo obj :dest-space :global))) (if (> RAD R) (setf R RAD) ) ) ) (programma) ) ) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/~A" PAD HYDRAULIEKBUIS))) ) ) ) (programma () (if (= R 0) (progn (sd-display-message (format nil "De buis met naam ~A is niet juist getekend! Maak gebruik van de module Pipe-bending" ORIGINEEL)) (sd-abort-dialog) ) (progn (setf X (* (gpnt3d_x (sd-plane-normal (sd-inq-geo-props VLAK :dest-space :global))) -1)) (setf Y (* (gpnt3d_y (sd-plane-normal (sd-inq-geo-props VLAK :dest-space :global))) -1)) (setf Z (* (gpnt3d_z (sd-plane-normal (sd-inq-geo-props VLAK :dest-space :global))) -1)) (setf RICHTING (make-gpnt3d :x X :y Y :z Z)) (setf D (sd-num-to-string (* 2 R) 0)) (sd-call-cmds (load_package (format nil "O:/Ruben/assy_~AL.pkg" D))) (display :clear-hide) (setf ASSY (format nil "/assy_~AL" D)) (setf STUK (format nil "~A/buis" ASSY)) (setf cirkel (sd-call-cmds (get_selection :focus_type *sd-circle-3d-seltype* :select :selected_part STUK :all_3d))) (dolist (obj cirkel "done") (progn (setf RICHT (sd-circle-normal (sd-inq-geo-props obj :dest-space :global))) (setf P (sd-circle-center (sd-inq-geo-props obj :dest-space :global))) (setf P2 (sd-edge-start-pnt (sd-inq-edge-geo obj :dest-space :global))) ) ) (sd-call-cmds (position_pa :part_assembly ASSY :match_pt_dir_pt P2 P3 RICHT RICHTING P CENTER)) (if (= TEL 2) (progn (sd-call-cmds (change_name_pa :part_asmb (format nil "~A/profielring_P-R~AL" ASSY D) :name (format nil "profielring_P-R~AL.~A" D TEL))) (sd-call-cmds (change_name_pa :part_asmb (format nil "~A/moer_M~AL" ASSY D) :name (format nil "moer_M~AL.~A" D TEL))) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/profielring_P-R~AL.~A" ASSY D TEL))) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/moer_M~AL.~A" ASSY D TEL))) (sd-call-cmds (delete_3d (format nil "/assy_~AL" D))) (setf TEL 1) ) ) (if (= TEL 0) (progn (sd-call-cmds (create_assembly :name (format nil "montage_~A" HYDRAULIEKBUIS) :owner PAD)) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/profielring_P-R~AL" ASSY D))) (sd-call-cmds (change_pa_owner :new_owner (format nil "~A/montage_~A" PAD HYDRAULIEKBUIS) :parts_assemblies (format nil "~A/moer_M~AL" ASSY D))) (sd-call-cmds (delete_3d (format nil "/assy_~AL" D))) (setf TEL 2) ) ) ) ) ) ) :ok-action '(doit) ) ;; end dialog |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|