Recent Posts

Pages: 1 ... 4 5 [6] 7 8 ... 10
51
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by mhy3sx on April 14, 2024, 01:08:35 PM »
I fix the problem  :smitten: :smitten: :smitten:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:SETSC (/ *error* dch dcl des sng sngReturn cursc newsc)
  2.   (defun *error* (msg)
  3.     (if (and (= 'int (type dch)) (< 0 dch))
  4.       (unload_dialog dch)
  5.     )
  6.     (if (= 'file (type des))
  7.       (close des)
  8.     )
  9.     (if (and (= 'str (type dcl)) (findfile dcl))
  10.       (vl-file-delete dcl)
  11.     )
  12.     (if (and msg
  13.              (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
  14.         )
  15.       (princ (strcat "\nError: " msg))
  16.     )
  17.     (princ)
  18.   )
  19.  
  20.   (setvar "OSMODE" 13)
  21.   (setq cursc (getvar "useri1"))
  22.  
  23.   (cond
  24.     ((not
  25.        (setq dcl (vl-filename-mktemp nil nil ".dcl")
  26.              des (open dcl "w")
  27.        )
  28.      )
  29.      (princ "\nUnable to open DCL for writing.")
  30.     )
  31.     ((progn
  32.        (foreach str
  33.                 '(
  34.                   "ed : edit_box { alignment = left; width = 25; edit_width = 10; fixed_width = true;}"
  35.                   ""
  36.                   "setscale : dialog { spacer; key = \"dcl\";"
  37.                   " : boxed_radio_column { key=\042key\042; label = \"Select Drawing Scale\"; height = 1.0;"
  38.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  39.                   "        key = \"radio_button01\"; label = \"1. --> 1:50\";"
  40.                   "    }"
  41.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  42.                   "        key = \"radio_button02\"; label = \"2. --> 1:100\";"
  43.                   "    }"
  44.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  45.                   "        key = \"radio_button03\"; label = \"3. --> 1:200\";"
  46.                   "    }"
  47.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  48.                   "        key = \"radio_button04\"; label = \"4. --> 1:250\";"
  49.                   "    }"                                        
  50.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  51.                   "        key = \"radio_button05\"; label = \"5. --> 1:500\";"
  52.                   "    }"
  53.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  54.                   "        key = \"radio_button06\"; label = \"6. --> 1:2000\";"
  55.                   "    }"
  56.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  57.                   "        key = \"radio_button07\"; label = \"7. --> 1:2500\";"
  58.                   "    }"
  59.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  60.                   "        key = \"radio_button08\"; label = \"8. --> 1:5000\";"
  61.                   "    }"
  62.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  63.                   "        key = \"radio_button09\"; label = \"9. --> 1:10000\";"
  64.                   "    }"
  65.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  66.                   "        key = \"radio_button10\"; label = \"10. --> 1:20000\";"
  67.                   "    }"
  68.                   "      : ed {height = 1.0; width = 25; is_tab_stop = true;"
  69.                   "        key = \"other\"; label = \"Other:\";"
  70.                   "    }"
  71.                   "      : ed {height = 1.0; width = 25; is_enabled = false;"
  72.                   "        key = \"oldscale\"; label = \"Old Scale:\";"
  73.                   "    }"
  74.                   "      }"
  75.                   "    ok_only;"
  76.                   "  }"
  77.                  )
  78.          (write-line str des)
  79.        )
  80.        (setq des (close des)
  81.              dch (load_dialog dcl)
  82.        )
  83.        (<= dch 0)
  84.      )
  85.      (princ "\nUnable to load DCL file.")
  86.     )
  87.     ((not (new_dialog "setscale" dch))
  88.      (princ "\nUnable to display 'setscale' dialog.")
  89.     )
  90.     (t
  91.      (set_tile "dcl" "Select Drawing Scale")
  92.      (set_tile "oldscale" (itoa cursc)) ; set the old scale in the dialog box
  93.         (action_tile "other" "(progn (setq sng \"other\") (setq sngReturn (atoi $value)))")
  94.         (action_tile "key" "(setq sng $value)")
  95.      (action_tile "OK" "(done_dialog 1)")
  96.          
  97.      (start_dialog)
  98.  
  99.      (if
  100.        (setq sngReturn
  101.          (cond
  102.            ( (eq sng "radio_button01") 50 )
  103.            ( (eq sng "radio_button02") 100 )
  104.            ( (eq sng "radio_button03") 200 )
  105.            ( (eq sng "radio_button04") 250 )
  106.            ( (eq sng "radio_button05") 500 )
  107.            ( (eq sng "radio_button06") 2000 )
  108.            ( (eq sng "radio_button07") 2500 )
  109.            ( (eq sng "radio_button08") 5000 )
  110.            ( (eq sng "radio_button09") 10000 )
  111.            ( (eq sng "radio_button10") 20000 )
  112.            ( (eq sng "other") sngReturn)
  113.            ( (eq sng "oldscale") cursc)
  114.          )
  115.        )
  116.        (progn
  117.          (princ "\nThe drawing scale is 1:")(princ sngReturn)
  118.          (setvar "useri1" sngReturn)
  119.        )
  120.      )
  121.     )
  122.   )
  123.   (*error* nil)
  124. )
  125.  
  126.  
52
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by ribarm on April 14, 2024, 12:21:00 PM »
Get AutoCAD...
53
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by mhy3sx on April 14, 2024, 12:06:48 PM »
Hi ribarm. I test your code . I  see that the other scale is not working in ZWCAD I use. I add some more things in the code but the other scale not working.

Any other ideas how to fix this problem?

Code - Auto/Visual Lisp: [Select]
  1. (defun c:SETSC (/ *error* dch dcl des sng sngReturn cursc newsc)
  2.   (defun *error* (msg)
  3.     (if (and (= 'int (type dch)) (< 0 dch))
  4.       (unload_dialog dch)
  5.     )
  6.     (if (= 'file (type des))
  7.       (close des)
  8.     )
  9.     (if (and (= 'str (type dcl)) (findfile dcl))
  10.       (vl-file-delete dcl)
  11.     )
  12.     (if (and msg
  13.              (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
  14.         )
  15.       (princ (strcat "\nError: " msg))
  16.     )
  17.     (princ)
  18.   )
  19.  
  20.   (setvar "OSMODE" 13)
  21.   (setq cursc (getvar "useri1"))
  22.  
  23.   (cond
  24.     ((not
  25.        (setq dcl (vl-filename-mktemp nil nil ".dcl")
  26.              des (open dcl "w")
  27.        )
  28.      )
  29.      (princ "\nUnable to open DCL for writing.")
  30.     )
  31.     ((progn
  32.        (foreach str
  33.                 '(
  34.                   "ed : edit_box { alignment = left; width = 25; edit_width = 10; fixed_width = true;}"
  35.                   ""
  36.                   "setscale : dialog { spacer; key = \"dcl\";"
  37.                   " : boxed_radio_column { key=\042key\042; label = \"Select Drawing Scale\"; height = 1.0;"
  38.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  39.                   "        key = \"radio_button01\"; label = \"1. --> 1:50\";"
  40.                   "    }"
  41.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  42.                   "        key = \"radio_button02\"; label = \"2. --> 1:100\";"
  43.                   "    }"
  44.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  45.                   "        key = \"radio_button03\"; label = \"3. --> 1:200\";"
  46.                   "    }"
  47.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  48.                   "        key = \"radio_button04\"; label = \"4. --> 1:250\";"
  49.                   "    }"                                        
  50.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  51.                   "        key = \"radio_button05\"; label = \"5. --> 1:500\";"
  52.                   "    }"
  53.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  54.                   "        key = \"radio_button06\"; label = \"6. --> 1:2000\";"
  55.                   "    }"
  56.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  57.                   "        key = \"radio_button07\"; label = \"7. --> 1:2500\";"
  58.                   "    }"
  59.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  60.                   "        key = \"radio_button08\"; label = \"8. --> 1:5000\";"
  61.                   "    }"
  62.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  63.                   "        key = \"radio_button09\"; label = \"9. --> 1:10000\";"
  64.                   "    }"
  65.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  66.                   "        key = \"radio_button10\"; label = \"10. --> 1:20000\";"
  67.                   "    }"
  68.                   "      : ed {height = 1.0; width = 25; is_tab_stop = true;"
  69.                   "        key = \"other\"; label = \"Other:\";"
  70.                   "    }"
  71.                   "      : ed {height = 1.0; width = 25; is_enabled = false;"
  72.                   "        key = \"oldscale\"; label = \"Old Scale:\";"
  73.                   "    }"
  74.                   "      }"
  75.                   "    ok_only;"
  76.                   "  }"
  77.                  )
  78.          (write-line str des)
  79.        )
  80.        (setq des (close des)
  81.              dch (load_dialog dcl)
  82.        )
  83.        (<= dch 0)
  84.      )
  85.      (princ "\nUnable to load DCL file.")
  86.     )
  87.     ((not (new_dialog "setscale" dch))
  88.      (princ "\nUnable to display 'setscale' dialog.")
  89.     )
  90.     (t
  91.      (set_tile "dcl" "Select Drawing Scale")
  92.      (set_tile "oldscale" (itoa cursc)) ; set the old scale in the dialog box
  93.      (action_tile "key" "(progn (setq sngReturn (atoi (get_tile \"other\"))) (setq sng $value))")
  94.      (action_tile "OK" "(done_dialog 1)")
  95.      (start_dialog)
  96.      (if
  97.        (setq sngReturn
  98.          (cond
  99.            ( (eq sng "radio_button01") 50 )
  100.            ( (eq sng "radio_button02") 100 )
  101.            ( (eq sng "radio_button03") 200 )
  102.            ( (eq sng "radio_button04") 250 )
  103.            ( (eq sng "radio_button05") 500 )
  104.            ( (eq sng "radio_button06") 2000 )
  105.            ( (eq sng "radio_button07") 2500 )
  106.            ( (eq sng "radio_button08") 5000 )
  107.            ( (eq sng "radio_button09") 10000 )
  108.            ( (eq sng "radio_button10") 20000 )
  109.            ( (eq sng "other") sngReturn)
  110.            ( (eq sng "oldscale") cursc)
  111.          )
  112.        )
  113.        (progn
  114.          (princ "\nThe drawing scale is 1:")(princ sngReturn)
  115.          (setvar "useri1" sngReturn)
  116.        )
  117.      )
  118.     )
  119.   )
  120.   (*error* nil)
  121. )
  122.  
  123.  
  124.  

Thansk
54
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by ribarm on April 14, 2024, 06:03:21 AM »
Here is your code debugged...
I hope you'll learn something - that error of yours is common for unbalanced brackets, but you had more lacks...
What I discovered more is that EDIT BOX don't work in BricsCAD, but works as desired in AutoCAD - tested on release 2022...

Code - Auto/Visual Lisp: [Select]
  1. (defun c:SETSC (/ *error* dch dcl des sng sngReturn )
  2.  
  3.   (defun *error* (msg)
  4.     (if (and (= 'int (type dch)) (< 0 dch))
  5.       (unload_dialog dch)
  6.     )
  7.     (if (= 'file (type des))
  8.       (close des)
  9.     )
  10.     (if (and (= 'str (type dcl)) (findfile dcl))
  11.       (vl-file-delete dcl)
  12.     )
  13.     (if (and msg
  14.              (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
  15.         )
  16.       (princ (strcat "\nError: " msg))
  17.     )
  18.     (princ)
  19.   )
  20.  
  21.   (cond
  22.     ((not
  23.        (setq dcl (vl-filename-mktemp nil nil ".dcl")
  24.              des (open dcl "w")
  25.        )
  26.      )
  27.      (princ "\nUnable to open DCL for writing.")
  28.     )
  29.     ((progn
  30.        (foreach str
  31.                 '(
  32.                   "ed : edit_box { alignment = left; width = 25; edit_width = 10; fixed_width = true;}"
  33.                   ""
  34.                   "setscale : dialog { spacer; key = \"dcl\";"
  35.                   " : boxed_radio_column { key=\042key\042; label = \"Select Drawing Scale\"; height = 1.0;"
  36.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  37.                   "        key = \"radio_button01\"; label = \"1. --> 1:50\";"
  38.                   "    }"
  39.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  40.                   "        key = \"radio_button02\"; label = \"2. --> 1:100\";"
  41.                   "    }"
  42.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  43.                   "        key = \"radio_button03\"; label = \"3. --> 1:200\";"
  44.                   "    }"
  45.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  46.                   "        key = \"radio_button04\"; label = \"4. --> 1:250\";"
  47.                   "    }"                                        
  48.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  49.                   "        key = \"radio_button05\"; label = \"5. --> 1:500\";"
  50.                   "    }"
  51.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  52.                   "        key = \"radio_button06\"; label = \"6. --> 1:2000\";"
  53.                   "    }"
  54.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  55.                   "        key = \"radio_button07\"; label = \"7. --> 1:2500\";"
  56.                   "    }"
  57.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  58.                   "        key = \"radio_button08\"; label = \"8. --> 1:5000\";"
  59.                   "    }"
  60.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  61.                   "        key = \"radio_button09\"; label = \"9. --> 1:10000\";"
  62.                   "    }"
  63.                   "      : radio_button { height = 1.0; width = 25; is_tab_stop = true;"
  64.                   "        key = \"radio_button10\"; label = \"10. --> 1:50000\";"
  65.                   "    }"
  66.                   "      : ed {height = 1.0; width = 25; is_tab_stop = true;"
  67.                   "        key = \"other\"; label = \"Other:\";"
  68.                   "    }"
  69.                   "      }"
  70.                   "    ok_only;"
  71.                   "  }"
  72.                  )
  73.          (write-line str des)
  74.        )
  75.        (setq des (close des)
  76.              dch (load_dialog dcl)
  77.        )
  78.        (<= dch 0)
  79.      )
  80.      (princ "\nUnable to load DCL file.")
  81.     )
  82.     ((not (new_dialog "setscale" dch))
  83.      (princ "\nUnable to display 'setscale' dialog.")
  84.     )
  85.     (t
  86.      (set_tile "dcl" "Select Drawing Scale")
  87.      (action_tile "key" "(progn (setq sngReturn (atoi (get_tile \"other\"))) (setq sng $value))")
  88.      (action_tile "OK" "(done_dialog 1)")
  89.      (start_dialog)
  90.      (if
  91.        (setq sngReturn
  92.          (cond
  93.            ( (eq sng "radio_button01") 50 )
  94.            ( (eq sng "radio_button02") 100 )
  95.            ( (eq sng "radio_button03") 200 )
  96.            ( (eq sng "radio_button04") 250 )
  97.            ( (eq sng "radio_button05") 500 )
  98.            ( (eq sng "radio_button06") 2000 )
  99.            ( (eq sng "radio_button07") 2500 )
  100.            ( (eq sng "radio_button08") 5000 )
  101.            ( (eq sng "radio_button09") 10000 )
  102.            ( (eq sng "radio_button10") 50000 )
  103.            ( (eq sng "other") sngReturn )
  104.          )
  105.        )
  106.        (progn
  107.          (princ "\nThe drawing scale is 1:")(princ sngReturn)
  108.          (setvar "useri1" sngReturn)
  109.          (initget 4)
  110.          (if (setq newsc (getint "\nThe new scale is (ENTER to discard) 1:"))
  111.            (setvar "useri1" newsc)
  112.          )
  113.        )
  114.      )
  115.     )
  116.   )
  117.   (*error* nil)
  118. )
  119.  

HTH.
M.R.
55
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by mhy3sx on April 14, 2024, 05:00:59 AM »
Hi BIGAL, I have seen this code before but I can not understand it. Can you Help me with my code?

Thanks
56
AutoLISP (Vanilla / Visual) / Re: Modifying Alignment to Profile View help
« Last post by BIGAL on April 13, 2024, 08:04:28 PM »
If your using "Civil Site Design" when in a profile design view you have a marker on your plan view showing where you are, as you move in the profile it moves in the model, if you have enough screen area can have cross sections open also so as vertical levels are changed the cross sections update.

Much easier and has so much more options at a reasonable price.
57
AutoLISP (Vanilla / Visual) / Re: Help: Set drawing scale DCL lisp
« Last post by BIGAL on April 13, 2024, 07:57:29 PM »
Just use this, it can be used in any code just save to a support path so autoloads. Just look at the examples say the 1 2 3 .........

58
.NET / Re: Adding and removing Layers from layerstates
« Last post by Jeff H on April 13, 2024, 05:46:28 PM »
Code - C#: [Select]
  1.  
  2.                 XrecordEnumerator enumer = xrec.GetEnumerator();
  3.  

Hey Jeff. Nice exploitation of XrecordEnumerator, but I think you also need to dispose that.
Didn’t think about it.
Thanks !
59
AutoLISP (Vanilla / Visual) / Re: Modifying Alignment to Profile View help
« Last post by Jeff_M on April 13, 2024, 02:12:55 PM »
Give this a try, @MSTG007

Code - Auto/Visual Lisp: [Select]
  1. (defun c:PV2AL (/ ss ent align profview endstation midstation pnt startstaion x y)
  2.   ;;Profile view to zoom to alignment
  3.   (setq ss (ssget ":S+." '((0 . "AECC_PROFILE_VIEW"))))
  4.   (if ss
  5.     (progn
  6.       (setq ent (ssname ss 0))
  7.       (setq profview (vlax-ename->vla-object ent))
  8.       (setq startstaion (vlax-get profview 'stationstart)
  9.             endstation  (vlax-get profview 'stationend)
  10.             midstation  (/ (+ startstaion endstation) 2)
  11.       )
  12.       (setq align (vlax-get profview 'parent))
  13.       (vlax-invoke-method align 'pointlocation midstation 0 'x 'y)
  14.       (setq pnt (list x y))
  15.       (command "zoom" "c" pnt 300)
  16.       (princ "Zoomed to Alignment.")
  17.     )
  18.   )
  19.   (princ)
  20. )
  21.  
60
AutoLISP (Vanilla / Visual) / Help: Set drawing scale DCL lisp
« Last post by mhy3sx on April 13, 2024, 12:49:24 PM »
Hi, I am writing a dcl lisp to set the scale of the drawing, but I have this error

Code: [Select]
Error: malformed list on input.

Code - Auto/Visual Lisp: [Select]
  1. (defun c:SETSC (/ *error* dch dcl des)
  2.   (defun *error* (msg)
  3.     (if (and (= 'int (type dch)) (< 0 dch))
  4.       (unload_dialog dch)
  5.     )
  6.     (if (= 'file (type des))
  7.       (close des)
  8.     )
  9.     (if (and (= 'str (type dcl)) (findfile dcl))
  10.       (vl-file-delete dcl)
  11.     )
  12.     (if (and msg
  13.              (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*"))
  14.         )
  15.       (princ (strcat "\nError: " msg))
  16.     )
  17.     (princ)
  18.   )                                     ; end defun
  19.  
  20.   (cond
  21.     ((not
  22.        (setq dcl (vl-filename-mktemp nil nil ".dcl")
  23.              des (open dcl "w")
  24.        )                                ; end setq
  25.      )                                  ; end not
  26.      (princ "\nUnable to open DCL for writing.")
  27.     )
  28.     ((progn
  29.        (foreach str
  30.                 '(
  31.                   "ed : edit_box { alignment = left; width = 20; edit_width = 10; fixed_width = true;}"
  32.                   ""
  33.                   "setscale : dialog { spacer; key = \"dcl\";"
  34.                   " : boxed_radio_column { key=\042key\042; label = \"Select Drawing Scale;\"; height = 1.0;"
  35.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  36.                   "        key = \"radio_button01\"; label = \"1. --> 1:50\";"
  37.                   "    }"
  38.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  39.                   "        key = \"radio_button02\"; label = \"2. --> 1:100\";"
  40.                   "    }"
  41.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  42.                   "        key = \"radio_button03\"; label = \"3. --> 1:200\";"
  43.                   "    }"
  44.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  45.                   "        key = \"radio_button04\"; label = \"4. --> 1:250\";"
  46.                   "    }"                                        
  47.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  48.                   "        key = \"radio_button05\"; label = \"5. --> 1:500\";"
  49.                   "    }"               ; radio_button
  50.                   "      : radio_button  { height = 1.0; width = 20; is_tab_stop = true;"
  51.                   "        key = \"radio_button06\"; label = \"6. --> 1:2000\";"
  52.                   "    }"               ; radio_button
  53.                   "      : radio_button  { height = 1.0; width = 20; is_tab_stop = true;"
  54.                   "        key = \"radio_button07\"; label = \"7. --> 1:2500\";"
  55.                   "    }"               ; radio_button
  56.                   "      : radio_button  { height = 1.0; width = 20; is_tab_stop = true;"
  57.                   "        key = \"radio_button08\"; label = \"8. --> 1:5000\";"
  58.                   "    }"               ; radio_button
  59.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  60.                   "        key = \"radio_button09\"; label = \"9. --> 1:10000\";"
  61.                   "    }"               ; radio_button
  62.                   "      : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
  63.                   "        key = \"radio_button10\"; label = \"10. --> 1:50000\";"
  64.                   "    }"               ; radio_button
  65.                   "      : ed {height = 1.0; width = 20; is_tab_stop = true;key = \"other\"; label = \"Other:\"; }"
  66.                   "      }"             ;end boxed_column
  67.                   "    ok_only;"
  68.                   "  }"                 ; end dialog
  69.                  )                      ;end list
  70.          (write-line str des)
  71.        )                                ; end foreach
  72.        (setq des (close des)
  73.              dch (load_dialog dcl)
  74.        )                                ; end setq
  75.        (<= dch 0)
  76.      )
  77.      (princ "\nUnable to load DCL file.")
  78.     )
  79.     ((not (new_dialog "setscale" dch))
  80.      (princ "\nUnable to display 'setscale' dialog.")
  81.     )
  82.     (t
  83.      (set_tile "dcl" "Select Drawing Scale")
  84.      (action_tile "key" "(setq sngReturn $value)")
  85.      (action_tile "OK" "(done_dialog 1)")
  86.      (start_dialog)
  87.  
  88.      (setvar "OSMODE" 13)
  89.  
  90.      (princ "\n The dawing scale set 1:")(princ newsc)(princ)
  91.      (if (setq sngReturn (cond ((eq sngReturn "radio_button01") 50)
  92.                            ((eq sngReturn "radio_button02") 100)
  93.                            ((eq sngReturn "radio_button03") 200)
  94.                            ((eq sngReturn "radio_button04") 250)
  95.                            ((eq sngReturn "radio_button05") 500)
  96.                            ((eq sngReturn "radio_button06") 2000)
  97.                            ((eq sngReturn "radio_button07") 2500)
  98.                            ((eq sngReturn "radio_button08") 5000)
  99.                            ((eq sngReturn "radio_button09") 10000)
  100.                            ((eq sngReturn "radio_button10") 50000)     
  101.                            ((eq sngReturn "other") (setq sngReturn (get_tile "other"))                                                             
  102.                      )
  103.      )
  104. )
  105.  
  106.                  (princ "\nThe drawing scale is 1:")(princ sngReturn)
  107.         (setq newsc (getint "\nThe new scale is  1:"))
  108.         (setvar "useri1" newsc)
  109.     )
  110.   ) ; end cond
  111.   (*error* nil)
  112. )
  113.  
  114.  
  115.  

Any ideas?

Thanks
Pages: 1 ... 4 5 [6] 7 8 ... 10