start_list locks up my system...
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
start_list locks up my system...

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Sage Cowsert
Guest





Posted: Mon Dec 20, 2004 10:05 pm    Post subject: start_list locks up my system... Reply with quote

I have a two radio buttons that when pressed would/should change the
contents of a popup_list but currently just locks up my system.

The radio buttons look like this:

(action_tile "ftg_totalbar_toggle" "(OCNUMTOGGLE)")
(action_tile "ftg_oncenter_toggle" "(OCNUMTOGGLE)")

Then:
(defun OCNUMTOGGLE ()
;;; (setq REBAR_SIZES_OPTION '("2" "3" "4" "5" "6" "7" "8" "9" "10" "11"
"14" "18"))
;;; (setq REBAR_SPACING_OPTION '("3\"" "4\"" "5\"" "6\"" "7\"" "8\"" "9\""
"10\"" "11\"" "12\"" "14\"" "18\""))
(if (= "1" (get_tile "ftg_totalbar_toggle"))
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list FTG_NUMBER_OPTION)
(end_list)
)
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list REBAR_SPACING_OPTION)
(end_list)
)
)
)

Any thoughts?


--
To reply via email remove 50 + 1 in my email address.

Back to top
BillZ
Guest





Posted: Mon Dec 20, 2004 11:21 pm    Post subject: Re: start_list locks up my system... Reply with quote

Seems to work here.

I don't see FTG_NUMBER_OPTION list anywhere so I haven't tested that one.

Bill
Back to top
Sage Cowsert
Guest





Posted: Tue Dec 21, 2004 12:07 am    Post subject: Re: start_list locks up my system... Reply with quote

Missed that one. Here it is. Thanks. :)

(setq FTG_NUMBER_OPTION '("None" "2" "3" "4" "5" "6" "7" "8" "9" "10"))


"BillZ" <nospam@address.withheld> wrote in message
news:19533859.1103566909454.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
Seems to work here.

I don't see FTG_NUMBER_OPTION list anywhere so I haven't tested that one.

Bill


Back to top
Rudy Tovar
Guest





Posted: Tue Dec 21, 2004 12:47 am    Post subject: Re: start_list locks up my system... Reply with quote

My 2 cents, but You should have to rebuild the list every time you pick the
button...

You should create a statup function to hold the listings, and organized it
just a bit more...follow the example...

(defun setup (/)
;listing1
;listing2
;etc.
(princ)
)

(setup)
(action_tile "radio1" "(setq con 1)(toggle_list)")
(action_tile "radio2" "(setq con 2)(toggle_list)")

(defun toggle_list (/)

(cond
((= con 1)
(progn
(start_list "list1" 3)
(mapcar 'add_list <;listing1>)
(end_list)
))
((= con 2)
(progn
(start_list "list1" 3)
(mapcar 'add_list <;listing2>)
(end_list)
))
)

;Nothing to fancy, just the structure...
--
MASi
Copyright 2004 by Cadentity
www.Cadentity.com
Autodesk
Authorized Developer



"Sage Cowsert" <scowsert@pcsa51inc.com> wrote in message
news:41c7065f_2@newsprd01...
Quote:
I have a two radio buttons that when pressed would/should change the
contents of a popup_list but currently just locks up my system.

The radio buttons look like this:

(action_tile "ftg_totalbar_toggle" "(OCNUMTOGGLE)")
(action_tile "ftg_oncenter_toggle" "(OCNUMTOGGLE)")

Then:
(defun OCNUMTOGGLE ()
;;; (setq REBAR_SIZES_OPTION '("2" "3" "4" "5" "6" "7" "8" "9" "10" "11"
"14" "18"))
;;; (setq REBAR_SPACING_OPTION '("3\"" "4\"" "5\"" "6\"" "7\"" "8\""
"9\"" "10\"" "11\"" "12\"" "14\"" "18\""))
(if (= "1" (get_tile "ftg_totalbar_toggle"))
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list FTG_NUMBER_OPTION)
(end_list)
)
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list REBAR_SPACING_OPTION)
(end_list)
)
)
)

Any thoughts?


--
To reply via email remove 50 + 1 in my email address.
Back to top
Rudy Tovar
Guest





Posted: Tue Dec 21, 2004 7:39 am    Post subject: Re: start_list locks up my system... Reply with quote

My correction "...shouldn't rebuild the list each time you pick the
button..."


"Rudy Tovar" <Rudy@CadentityNoSpam.com> wrote in message
news:41c72b7f_3@newsprd01...
Quote:
My 2 cents, but You should have to rebuild the list every time you pick
the button...

You should create a statup function to hold the listings, and organized it
just a bit more...follow the example...

(defun setup (/)
;listing1
;listing2
;etc.
(princ)
)

(setup)
(action_tile "radio1" "(setq con 1)(toggle_list)")
(action_tile "radio2" "(setq con 2)(toggle_list)")

(defun toggle_list (/)

(cond
((= con 1)
(progn
(start_list "list1" 3)
(mapcar 'add_list <;listing1>)
(end_list)
))
((= con 2)
(progn
(start_list "list1" 3)
(mapcar 'add_list <;listing2>)
(end_list)
))
)

;Nothing to fancy, just the structure...
--
MASi
Copyright 2004 by Cadentity
www.Cadentity.com
Autodesk
Authorized Developer



"Sage Cowsert" <scowsert@pcsa51inc.com> wrote in message
news:41c7065f_2@newsprd01...
I have a two radio buttons that when pressed would/should change the
contents of a popup_list but currently just locks up my system.

The radio buttons look like this:

(action_tile "ftg_totalbar_toggle" "(OCNUMTOGGLE)")
(action_tile "ftg_oncenter_toggle" "(OCNUMTOGGLE)")

Then:
(defun OCNUMTOGGLE ()
;;; (setq REBAR_SIZES_OPTION '("2" "3" "4" "5" "6" "7" "8" "9" "10" "11"
"14" "18"))
;;; (setq REBAR_SPACING_OPTION '("3\"" "4\"" "5\"" "6\"" "7\"" "8\""
"9\"" "10\"" "11\"" "12\"" "14\"" "18\""))
(if (= "1" (get_tile "ftg_totalbar_toggle"))
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list FTG_NUMBER_OPTION)
(end_list)
)
(progn
(start_list "stem_rebar_numb")
(mapcar 'add_list REBAR_SPACING_OPTION)
(end_list)
)
)
)

Any thoughts?


--
To reply via email remove 50 + 1 in my email address.


Back to top
BillZ
Guest





Posted: Tue Dec 21, 2004 5:45 pm    Post subject: Re: start_list locks up my system... Reply with quote

Sage Cowsert,

I am thinking that you want all 3 values returned to calculate your final results, correct?

It would seem a lot simpler if you would have 3 popup lists and have the user make a choice from each one of them.

As Rudy T. already stated, there's no need to set the value of the list variables more than once. They can be set at the start of the dialog.

See example below:

Code:
              ;BILL ZONDLO 12/21/04
              ;to get value of popup picks.
;-----;
(defun set_variable ()
  (setq ListVal1 (get_tile "stem_rebar_numb1")
        ListVal2 (get_tile "stem_rebar_numb2")
        ListVal3 (get_tile "stem_rebar_numb3")       
        ListVal1 (nth (atoi ListVal1) FTG_NUMBER_OPTION)
        ListVal2 (nth (atoi ListVal2) REBAR_SPACING_OPTION)
        ListVal3 (nth (atoi ListVal3) REBAR_SIZES_OPTION)
          )
           
   (done_dialog 1)
 )
;-----;
(defun c:TestRadio (/ an dcl_id ListVal1 ListVal2 ListVal3
                      REBAR_SIZES_OPTION REBAR_SPACING_OPTION FTG_NUMBER_OPTION)
;-----;
(setq dcl_id (load_dialog "g:/lsptemp/testradio.dcl"))
   (if (not (new_dialog "testradio" dcl_id ""))     
       (exit)
       (progn
       (setq REBAR_SIZES_OPTION
          '("2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "14" "18")
         )
       (setq REBAR_SPACING_OPTION
          '("3\"" "4\"" "5\"" "6\"" "7\"" "8\"" "9\"" "10\"" "11\"" "12\"" "14\"" "18\"")
         )
       (setq FTG_NUMBER_OPTION
          '("None" "2" "3" "4" "5" "6" "7" "8" "9" "10")
         )
       (start_list "stem_rebar_numb1")
       (mapcar 'add_list FTG_NUMBER_OPTION)
       (end_list)
       
       (start_list "stem_rebar_numb2")
       (mapcar 'add_list REBAR_SPACING_OPTION)
       (end_list)
       
       (start_list "stem_rebar_numb3")
       (mapcar 'add_list REBAR_SIZES_OPTION)
       (end_list)
       
       (action_tile "accept" "(set_variable)")
       (action_tile "cancel" "(done_dialog 0)")                                 
       (setq an (start_dialog))
       (unload_dialog dcl_id)
          )                                                    ;end progn
      )                                                        ;end if
;---;
(if (= an 1)
    (alert (strcat " Test returns <  " ListVal1 "  " ListVal2 "  " ListVal3  "  > from Dialog."))
  )
;---;
  (princ)
)


Heres the dialog for this test.

Code:
//  Bill Zondlo  12/21/04
//  Dialoge Box for popup test
//
//
   dcl_settings : default_dcl_settings
     { audit_level = 3       ;}
   testradio : dialog {                       
     label = "   Test Radio Value"  ;
     
 :text {
       label =   ""        ;
       key   =   "info"    ;
       }
 :row  {
        fixed_width  =  true   ;
 :popup_list {
       label = "Pick1: "  ;
       key   =  "stem_rebar_numb1"   ;
       width = 15 ;
       fixed_width  =  true   ;
       alignment    =   centered   ;
            }
 :spacer_1{}
 :popup_list {
       label = "Pick2: "  ;
       key   =  "stem_rebar_numb2"   ;
       width = 15 ;
       fixed_width  =  true   ;
       alignment    =   centered   ;
            }
 :spacer_1{}
 :popup_list {
       label = "Pick3: "  ;
       key   =  "stem_rebar_numb3"   ;
       width = 15 ;
       fixed_width  =  true   ;
       alignment    =   centered   ;
            }
     }
  :spacer {height = 2 ; }
  :boxed_row  {
 
  :text_part  {
     label        = "   Press OK:" ;
                }
 
      ok_cancel                     ;
      alignment  =  centered  ;
      fixed_width   =  true         ;
         }
:spacer {height = 1 ; }
   
  }


If this is not what you want, let me know.

Bill
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB