TheSwamp
Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: cadplayer on May 28, 2013, 09:05:43 AM
-
Hi!
Anybody here that know how I can get textvalue from a definition form in a Lispvariable ?
-
Are you looking for (dcl_Control_GetText) (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Property/Text.htm)?
-
Yes I know that, but I have definition standards in ODCL_form (see form.bmp)
When I start Lispcode it shows for example in first Line
Asfaltbetongslitlager för "huvudgata"
If I don´t change the line I want that line should save in Lispvariable
(defun c:Materialtabell_Form1_tb1-1_OnEditChanged (NewValue /)
(if (null (setq tb1-1 (dcl_Control_GetText Materialtabell_Form1_tb1-1)))
(setq tb1-1 "")
)
Here it saves ony empty
-
I'm not sure I understand correctly, but I suspect this is what you're after:
-
Maybe not possible. :-(
Another question is, I type i values in editbox (textbox) from Materialtabell_Form1.
If I press Enter after complete it close the form than I want create a block and fill the attributes with values from Form1.
(defun c:test ()
(setvar "CMDECHO" 0)
(command "_OPENDCL")
(dcl_project_load (strcat DCL "Materialtabell.odcl"))
(setq Result (dcl_form_show MaterialTabell_Form1))
(command "_insert"....
)
In the code it would create the block before I type in values, how can I ask if all textboxes have values it should create the block ?
-
Can somebody see whats wrong
(defun cp:control (/ )
(if (= nil
(member nil
(list tb1-1
tb1-2
tb2-1
tb2-2
tb3-1
tb3-2
tb4-1
tb4-2
tb5-1
tb5-2
tb6-1
tb6-2
)
)
)
(princ "ok")
(princ "Tabelle unvollständig !")
)
(princ)
)
(defun c:test ()
(setvar "CMDECHO" 0)
(command "_OPENDCL")
(dcl_project_load (strcat DCL "Materialtabell.odcl"))
(dcl_form_show MaterialTabell_Form1)
)
(defun c:Materialtabell_Form1_tb1-1_OnEditChanged (NewValue /)
(if (null (setq tb1-1 (dcl_Control_GetText Materialtabell_Form1_tb1-1)))
(setq tb1-1 "")
)
)
(defun c:Materialtabell_Form1_tb1-2_OnEditChanged (NewValue /)
(if (null (setq tb1-2 (dcl_Control_GetText Materialtabell_Form1_tb1-2)))
(setq tb1-2 "")
)
)
(defun c:Materialtabell_Form1_tb2-1_OnEditChanged (NewValue /)
(if (null (setq tb2-1 (dcl_Control_GetText Materialtabell_Form1_tb2-1)))
(setq tb2-1 "")
)
)
(defun c:Materialtabell_Form1_tb2-2_OnEditChanged (NewValue /)
(if (null (setq tb2-2 (dcl_Control_GetText Materialtabell_Form1_tb2-2)))
(setq tb2-2 "")
)
)
(defun c:Materialtabell_Form1_tb3-1_OnEditChanged (NewValue /)
(if (null (setq tb3-1 (dcl_Control_GetText Materialtabell_Form1_tb3-1)))
(setq tb3-1 "")
)
)
(defun c:Materialtabell_Form1_tb3-2_OnEditChanged (NewValue /)
(if (null (setq tb3-2 (dcl_Control_GetText Materialtabell_Form1_tb3-2)))
(setq tb3-2 "")
)
)
(defun c:Materialtabell_Form1_tb4-1_OnEditChanged (NewValue /)
(if (null (setq tb4-1 (dcl_Control_GetText Materialtabell_Form1_tb4-1)))
(setq tb4-1 "")
)
)
(defun c:Materialtabell_Form1_tb4-2_OnEditChanged (NewValue /)
(if (null (setq tb4-2 (dcl_Control_GetText Materialtabell_Form1_tb4-2)))
(setq tb4-2 "")
)
)
(defun c:Materialtabell_Form1_tb5-1_OnEditChanged (NewValue /)
(if (null (setq tb5-1 (dcl_Control_GetText Materialtabell_Form1_tb5-1)))
(setq tb5-1 "")
)
)
(defun c:Materialtabell_Form1_tb5-2_OnEditChanged (NewValue /)
(if (null (setq tb5-2 (dcl_Control_GetText Materialtabell_Form1_tb5-2)))
(setq tb5-2 "")
)
)
(defun c:Materialtabell_Form1_tb6-1_OnEditChanged (NewValue /)
(if (null (setq tb6-1 (dcl_Control_GetText Materialtabell_Form1_tb6-1)))
(setq tb6-1 "")
)
)
(defun c:Materialtabell_Form1_tb6-2_OnEditChanged (NewValue /)
(if (null (setq tb6-2 (dcl_Control_GetText Materialtabell_Form1_tb6-2)))
(setq tb6-2 "")
)
)
(defun c:Materialtabell_Form1_OnInitialize (/)
(cp:control)
)
(defun c:Materialtabell_Form1_OnOK (/)
(command "_insert" "MaterialTabell" (getpoint "\nWähle Einfügepunkt ") (getvar "DIMSCALE") (getvar "DIMSCALE") 0
tb1-1
tb1-2
tb2-1
tb2-2
tb3-1
tb3-2
tb4-1
tb4-2
tb5-1
tb5-2
tb6-1
tb6-2
)
)
-
I think you're looking for the (and) function. Please start a new thread ehwn you have a new question, otherwise the existing thread gets polluted.