Code Red > AutoLISP (Vanilla / Visual)

BigAL ah:butts ?

<< < (2/3) > >>

jlogan02:
It's looking good. Thanks for the update.
--- Quote from: BIGAL on January 28, 2021, 06:28:42 PM ---Working on a dual column library radio buttons dcl. Version 2 with spacing, I have not put it anywhere yet will do as part of multi column.

Downloads at Cadtutuor
Multi getvals
Multi Radio Buttons
Multiple toggles
Multi getvals image


--- End quote ---

BIGAL:
Starting to get somewhere its 2 at moment but will probably do a as many as required 1, 2 or 3+ so will replace the default Multi radio buttons.

A couple of fixes is add a column heading, reduce gap in column spacing.


--- Code: ---(if (= but nil)(setq but 1))
(if (= but2 nil)(setq but2 1))

(setq lst (list "Please Choose " "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"))
(setq lst2 (list "A" "B" "C" "D"))
(ah:buttscol but but2  lst lst2)

; desirable
; (setq lst3 (list 'Yes" "No" ))
; (setq lst4 ......


--- End code ---

Happy to accept requests for testing, just supply the lists as strings must be strings in a dcl but can convert numbers like a variables.

jlogan02:
Took a short look at it today. I haven't had time to test though. I'm hoping tomorrow to get some time. The screencap looks good though.

jlogan02:
HOLD ON...I just noticed the error message is call out a 00x.dcl not a .lsp. I'm looking at the wrong file.

Getting this error message when running the routine (see screen cap).

Since I don't have 112 lines of code, I'm assuming it's in the "Multi Radio buttons 2col.lsp" code. If it is there, I'm not seeing the error.



--- Code - Auto/Visual Lisp: ---(defun c:test12 ( / ans but2 lst lst2 p1 p2 )  (if (not ah:buttscol)(load "Multi Radio buttons 2col.lsp")) (if (= but nil)(setq but 1)) (if (= but2 nil)(setq but2 1)) (setq lst (list "Select number" "256" "1" "15" "30" "150" )) (setq lst2 (list "Choose Layer" "LINE0 (CENTER)" "LINE1 (PHANTOMA)" "LINE2 (CONTINUOUS)" "LINE3 (CONTINUOUS)" "LINE4 (CONTINUOUS)" "LINE5 (CONTINUOUS)" "LINE6 (VOLTAGE)" "LINE7 (DASHED)" "CLOUD (ZIGZAG)" )) (ah:buttscol but but2 "Please choose" lst lst2) (setvar 'cecolor lst) (setvar 'clayer lst2)  (while (and (or p1 (setq p1 (getpoint "\nSpecify start point: ")))                   (setq p2 (getpoint p1 "\nSpecify next point: "))           )(command "line" p1 p2 "")          (setq p1 p2)  ) )

BIGAL:
The error is in the setvar you are setting a list not a single item (setvar 'cecolor (nth but lst))

I have changed the code will send you an update as I was using the same global variable for all multi's.

Better at this time to email me as have not posted code.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version