TheSwamp
Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: jonathann3891 on June 16, 2021, 11:38:54 AM
-
I've created a few simple dialog boxes with OpenDCL and now I'm ready to dive a little deeper.
Can OpenDCL read SDF files?
Can I display different SDF files based on a selection in a listbox?
(dcl-ListBox-AddList Steel2D/Form1/ListBox1 (list "HM" "HN" "HW" "I" "HT" "TM" "TN" "TW" "C" "L" "CHS" "RHS" "SHS")
So if I pick "HM" then it will display the data from "HM.SDF".
-
I believe I need to use the "SelChanged" event for the listbox.
I can get the index of the item using
(defun c:Steel2D/Form1/ListBox1#OnSelChanged (ItemIndexOrCount Value /)
(setq CurSel (dcl-ListBox-GetCurSel Steel2D/Form1/ListBox1))
)
I need the text value. How can I get that? I've tried different variations with
dcl-ListBox-GetItemText
Do I need to combine these two functions? If so what the correct way to do so?
-
I got everything in my second post working.
The part I'm really struggling with is creating a list form the text file and populating ListBox2.