;;--------------------------------------------------------------------------* ;; Copyright 2003 DC4 Technisches Büro GmbH * ;; * ;;--------------------------------------------------------------------------* ;; Dateiname: menu_beispiel.lsp (in-package :custom) (use-package :OLI) (sd-create-menu "my-tools" :title "Meine Tools" :contents `( (:buttonBox "teile" :title "Teile & Baugruppen Infos" :buttons ( (gr_wellegen :label "Welle07") ) ) ;; (:buttonBox "xxxx" ;; :title "YYYY" ;; :buttons ;; ( ;; ... ;; ... ;; ) ;; ) ) ) (sd-add-menu-button "my-tools" :label "Werkzeugbau" ;; :parent '("TASK" "Annotation") :parent '("TASK" "SolidDesigner") :mapmenu "my-tools" ) ;;--------------------------------------------------------------------------- ; Autor : Martin Mersmann ; Erstellt: 2003 OSD 11.60 ; Beschreibung siehe :help-action ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; (sd-defdialog 'gr_wellegen :dialog-title "Wellen-Generator" :variables '((A_PART :value-type :part-incl-new :modifies :contents :title "Teil" ; :initial-value "/Welle" :prompt-text "Name für die Welle eingeben.") (A_ASSEM :value-type :assembly :modifies :contents :title "Baugruppe" :prompt-text "Baugruppe auswaehlen.") ("Position") (Startpunkt :value-type :point-3d) (Richtung :value-type :measure-direction ) (Abstand :value-type :length :prompt-text "Abstand vom Startpunkt in Achsrichtung." :initial-value 0) ;; :positive-length number [mm] ("Absaetze") (Durchm-01 :value-type :distance :prompt-text "Durchmesser fuer Absatz 1 angeben." :initial-value 1000) (Laenge-01 :value-type :distance :prompt-text "Laenge fuer Absatz 1 angeben." :initial-value 1000) (Durchm-02 :value-type :distance :prompt-text "Durchmesser fuer Absatz 2 angeben." :initial-value 1000) (Laenge-02 :value-type :distance :prompt-text "Laenge fuer Absatz 2 angeben." :initial-value 1000) (Durchm-03 :value-type :distance :prompt-text "Durchmesser fuer Absatz 3 angeben." :initial-value 1000) (Laenge-03 :value-type :distance :prompt-text "Laenge fuer Absatz 3 angeben." :initial-value 1000) (Durchm-04 :value-type :distance :prompt-text "Durchmesser fuer Absatz 4 angeben." :initial-value 1000) (Laenge-04 :value-type :distance :prompt-text "Laenge fuer Absatz 4 angeben." :initial-value 1000) (Durchm-05 :value-type :distance :prompt-text "Durchmesser fuer Absatz 5 angeben." :initial-value 1000) (Laenge-05 :value-type :distance :prompt-text "Laenge fuer Absatz 5 angeben." :initial-value 1000) (Durchm-06 :value-type :distance :prompt-text "Durchmesser fuer Absatz 6 angeben." :initial-value 1000) (Laenge-06 :value-type :distance :prompt-text "Laenge fuer Absatz 6 angeben." :initial-value 1000) (Durchm-07 :value-type :distance :prompt-text "Durchmesser fuer Absatz 7 angeben." :initial-value 1000) (Laenge-07 :value-type :distance :prompt-text "Laenge fuer Absatz 7 angeben." :initial-value 1000) (Durchm-08 :value-type :distance :prompt-text "Durchmesser fuer Absatz 8 angeben." :initial-value 1000) (Laenge-08 :value-type :distance :prompt-text "Laenge fuer Absatz 8 angeben." :initial-value 1000) (Durchm-09 :value-type :distance :prompt-text "Durchmesser fuer Absatz 9 angeben." :initial-value 1000) (Laenge-09 :value-type :distance :prompt-text "Laenge fuer Absatz 9 angeben." :initial-value 1000) (Durchm-10 :value-type :distance :prompt-text "Durchmesser fuer Absatz 10 angeben." :initial-value 1000) (Laenge-10 :value-type :distance :prompt-text "Laenge fuer Absatz 10 angeben." :initial-value 1000) ) :ok-action '(progn (create_workplane :new :name "Wellen_Generator" :pt_dir :origin Startpunkt :normal (first Richtung) :done ) (position_wp "/Wellen_Generator" :translate :dir_len :w Abstand) (circle :cen_dia 0,0 Durchm-01 ) (extrude :auto_direction :yes :sel_part A_PART :distance Laenge-01 :keep_profile :no ) (if (< Durchm-02 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-01) (circle :cen_dia 0,0 Durchm-02 ) (extrude :auto_direction :yes :distance Laenge-02 :keep_profile :no )) ) (if (< Durchm-03 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-02) (circle :cen_dia 0,0 Durchm-03 ) (extrude :auto_direction :yes :distance Laenge-03 :keep_profile :no )) ) (if (< Durchm-04 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-03) (circle :cen_dia 0,0 Durchm-04 ) (extrude :auto_direction :yes :distance Laenge-04 :keep_profile :no )) ) (if (< Durchm-05 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-04) (circle :cen_dia 0,0 Durchm-05 ) (extrude :auto_direction :yes :distance Laenge-05 :keep_profile :no )) ) (if (< Durchm-06 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-05) (circle :cen_dia 0,0 Durchm-06 ) (extrude :auto_direction :yes :distance Laenge-06 :keep_profile :no )) ) (if (< Durchm-07 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-06) (circle :cen_dia 0,0 Durchm-07 ) (extrude :auto_direction :yes :distance Laenge-07 :keep_profile :no )) ) (if (< Durchm-08 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-07) (circle :cen_dia 0,0 Durchm-08 ) (extrude :auto_direction :yes :distance Laenge-08 :keep_profile :no )) ) (if (< Durchm-09 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-08) (circle :cen_dia 0,0 Durchm-09 ) (extrude :auto_direction :yes :distance Laenge-09 :keep_profile :no )) ) (if (< Durchm-10 1000) (progn (position_wp "/Wellen_Generator" :translate :dir_len :w Laenge-09) (circle :cen_dia 0,0 Durchm-10 ) (extrude :auto_direction :yes :distance Laenge-10 :keep_profile :no )) ) (CHANGE_PA_OWNER :PARTS_ASSEMBLIES A_PART :NEW_OWNER A_ASSEM ) (delete_3d "/Wellen_Generator" ) ) :help-action '(progn (display :show ) (display " ") (display "Hilfe zu 'Wellen-Generator'") (display " ") (display "Der Teilename wird angegeben. Von einem vorhandenen Teil wird die Geometrie nicht geloescht. ") (display " ") (display "Die Baugruppe wird als Besitzer gewaehlt oder / eingeben. ") (display " ") (display "Der Startpunkt an dem die Welle beginnt wird gewaehlt.") (display " ") (display "Die Richtung der Wellenachse wird gewaehlt. ") (display " ") (display "Mit Abstand kann die Welle in Richtung der Achse vom Startpunkt weggeschoben werden. Mit positiven und negativen Zahlen. ") (display " ") (display "Durchmesser und Laengen der Absaetze eingeben. Die Schaltflaeche z.B. 'Durchm-01' anklicken und die Zahl eintippen. Die Zahl 1000 muss dann nicht geloescht werden. ") (display " ") ))