Author Topic: Drawing Template Lisp  (Read 2637 times)

0 Members and 1 Guest are viewing this topic.

Sitra

  • Guest
Drawing Template Lisp
« on: February 09, 2005, 10:12:50 AM »
I have been doing some cutting and pasting of a lisp and dcl routine. And I wanted to know if anyone knew of a way I could modify it so, that when I pick a project and select ok it will open that projects template and also let me scale the viewport. The view port scale isn't all that important if it can't be done. Any help on this would be appreciated.

Here is the lsp:

Code: [Select]
(defun c:ProjectTemplate ()
     (setvar "BLIPMODE" 0)
     (setvar "CMDECHO" 0)
     (setvar "OSMODE" 0)
     (setq typ "e")
     (setq dcl_id (load_dialog "ProjectTemplate.dcl"))
     (if (not
  (new_dialog "ProjectTemplate" dcl_id)
)
           (exit)
     )
     (set_tile "rb1" "1")
     (action_tile "rb1"
         "(setq typ \"e\")
          (mode_tile \"eb1\" 2) ")
     (action_tile "rb2"
         "(setq typ \"a\")
          (mode_tile \"eb1\" 2) ")
     (action_tile "rb3"
         "(setq typ \"c\")
          (mode_tile \"eb1\" 2) ")
     (action_tile "rb4"
         "(setq typ \"e1\")
          (mode_tile \"eb1\" 2) ")
     (action_tile "rb5"
         "(setq typ \"b\")
          (mode_tile \"eb1\" 2) ")

     (action_tile "cancel"
         "(done_dialog) (setq userclick nil) ")
     (action_tile "accept"
          (strcat
         "(progn (setq #dwgsc
                 (atof (get_tile \"eb1\")))"
              "(done_dialog) (setq userclick T))"

      )
     )

     (start_dialog)
     (unload_dialog dcl_id)

 (princ)
)
(princ)


Here is the dcl:

Code: [Select]
ProjectTemplate : dialog {
         label = "New Drawing Setup";
       : row {
       : boxed_radio_column {
         label = "Choose Project";
         : radio_button {
           label = "&Project Name";
           key = "rb1";
           value = "1";
         }
         : radio_button {
           label = "&Project Name";
           key = "rb2";
         }
         : radio_button {
           label = "&Project Name";
           key = "rb3";
         }
         : radio_button {
           label = "Project Name";
           key = "rb4";
         }
         : radio_button {
           label = "Project Name";
           key = "rb5";
         }
       }
       }
         : edit_box {
           label = "&Enter Drawing Scale :" ;
           key = "eb1" ;
           edit_width = 8 ;
         }
         : spacer { width = 1;}
         ok_cancel ;
         : paragraph {
            : text_part {
           
            }
         }
       }

Sitra

  • Guest
Drawing Template Lisp
« Reply #1 on: February 11, 2005, 02:39:19 PM »
Man I must of asked a pretty hard question. Not even one response... :shock:  :?

ELOQUINTET

  • Guest
Drawing Template Lisp
« Reply #2 on: February 11, 2005, 02:54:42 PM »
now you know how i feel hehehehe i was hoping someone would respond actually. i've been thinking about trying to create a startup lisp recently but i've decided to quit instead  :lol:

Sitra

  • Guest
Drawing Template Lisp
« Reply #3 on: February 11, 2005, 03:56:52 PM »
Yeah I know what you mean. :lol:

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Drawing Template Lisp
« Reply #4 on: February 11, 2005, 04:44:57 PM »
Quote from: ELOQUINTET
now you know how i feel hehehehe i was hoping someone would respond actually. i've been thinking about trying to create a startup lisp recently but i've decided to quit instead  :lol:

So you've forgot about this -------> http://theswamp.org/phpBB2/viewtopic.php?t=3969
TheSwamp.org  (serving the CAD community since 2003)