How in LIST DATA input to the GRID form in,also may output in the writing file?
under has a section in series,
(setq lst (list (list "A" 0 22)
(list "B" 1 23)
(list "C" 2 24)
(list "D" 3 25)
(list "E" 4 26)
))
how are list data in the grid form ?
Moreover, may output into the writing file,
how should process?
as long as you have the 3 columns setup at design-time, this will work:
(setq lst (list
(list "A" "0" "22")
(list "B" "1" "23")
(list "C" "2" "24")
(list "D" "3" "25")
(list "E" "4" "26")
))
(dcl_Grid_FillList Proj1_Form1_Grid1 lst)
(Note, this need to be strings, not Int's)
Have a look at the intelligent Help system for more info on these functions.
You can also use:
(Setq rValue (dcl_Grid_AddString Proj1_Form1_Grid1
sString [as String]
{Optional} sDelimiters [as String]))
OR
(dcl_Grid_AddRow Proj1_Form1_Grid1
(list
{Optional} nImageIndex ... [as Integer]
sText [as String]
{Optional} sColText1 sColText2 sColText3 ... [as String])))
For writing to a file, use the LSP functions OPEN & WRITE-LINE, there's no OpenDCL functions needed to write to a file.
(setq output (open "C:\\temp.txt" "W"))
(write-line "HELLO WORLD" output)
(close output)
I hope this helps. :)