r1:boxed_row{
width=60;
:boxed_column{
: text {label = "Enter dimensions:"; key = "w_t1";}
: edit_box {label = "A (Width)"; key = "W_A"; edit_width=10; value = "0";}
: edit_box {label = "B (Lenght)"; key = "W_B"; edit_width=10; value = "0";}
: edit_box {label = "C (Height)"; key = "W_C"; edit_width=10; value = "0";}
: edit_box {label = "H1 (Front)"; key = "W_H1"; edit_width=10; value = "50";}
: edit_box {label = "H2 (Back)"; key = "W_H2"; edit_width=10; value = "30";}
: edit_box {label = "CH (Chamfer)"; key = "W_CH"; edit_width=10; value = "25";}
: edit_box {label = "D (Diameter outlet)"; key = "W_D"; edit_width=10; value = "51";}
: edit_box {label = "E (>CH)"; key = "W_E"; edit_width=10; value = "75";}
: edit_box {label = "D1 (Diameter of bar)"; key = "W_D1"; edit_width=10; value = "16";}
: edit_box {label = "F1"; key = "W_F1"; edit_width=10; value = "50";}
: edit_box {label = "F2"; key = "W_F2"; edit_width=10; value = "50";}
: edit_box {label = "G"; key = "W_G"; edit_width=10; value = "150";}
: edit_box {label = "H (>D1)"; key = "W_H"; edit_width=10; value = "30";}
}
:boxed_column {:image{width=120; height=35; aspect_ratio=3; color=-2; key="dbimage"; is_enabled=false;}
}
}
d1:dialog{label="Drain Pallet";
r1;
ok_cancel;
}
;-----Read_Dimensions_From_DCL-----
(defun savevars()
;-----Box-----
(setq A (atoi (get_tile "W_A")))
(setq B (atoi (get_tile "W_B")))
(setq C (atoi (get_tile "W_C")))
;-----Slope-----
(setq H1 (atoi (get_tile "W_H1")))
(setq H2 (atoi (get_tile "W_H2")))
;-----Chamfer-----
(setq CH (atoi (get_tile "W_CH")))
;-----Drain_Tube---------
(setq D (atoi (get_tile "W_D")))
;-----Handrails-----
(setq E (atoi (get_tile "W_E")))
(setq D1 (atoi (get_tile "W_D1")))
(setq F1 (atoi (get_tile "W_F1")))
(setq F2 (atoi (get_tile "W_F2")))
(setq G (atoi (get_tile "W_G")))
(setq H (atoi (get_tile "W_H")))
)
For example, if you were to assign the values obtained through the dialog interface to global variables (or perhaps a single global variable containing a list of values), the variable would be defined within the document namespace and therefore the values would be accessible from the active drawing and would persist for the duration of active drawing session.I want it to work that way. This Lisp will be used by 4 other users, so they should not interfere with each other (what apparently can happen if we will use additional file).
Have a look at this its a library routine you can have from 1 to about 20 lines of input, it uses a list for input there are examples in code. Its dynamic in that the number of items in list is how big the dcl ends up.I dont know why, but i cant download your file.
Basically what I wrote SQLiteLisp for. OpenDCL has an archive feature to persist data. Lots of cool ways to persist dataI started learning OpenDCL and i will try to use it in my next Lisp. But that one i wanted to finish without any additional soft as a learning process.
For example, if you were to assign the values obtained through the dialog interface to global variables (or perhaps a single global variable containing a list of values), the variable would be defined within the document namespace and therefore the values would be accessible from the active drawing and would persist for the duration of active drawing session.I want it to work that way. This Lisp will be used by 4 other users, so they should not interfere with each other (what apparently can happen if we will use additional file).
OP is talking about DCL, not OpenDCL.
(vlax-ldata-put "AlanH" "Layoutname" client )
(vlax-ldata-put "AlanH" "Ahscale" ahsc)
Is there a reason that you used an Excel file over a plain text file?Lack of knowledge i think is the only reason. I found the way how to connect each value to each expression in excel, but for text file i only know how to write values like this: 100, 200, 300... etc. And i have no idea how i can read them after so each value will match each expression.
Why not save in dwg ? Can use get to retrieve the values.I didnt know that this is possible. My idea was to have values at the first start of program in DCL window, then to modify them, those modified values must be saved so after i run programm again there will be new values in DCL window. If i understood that function correctly then i can store values in object (3D model i created for example) and then use them at a second run of a programm, but what shoud i do with the first run then, where i can take values?
Is there a reason that you used an Excel file over a plain text file?Lack of knowledge i think is the only reason. I found the way how to connect each value to each expression in excel, but for text file i only know how to write values like this: 100, 200, 300... etc. And i have no idea how i can read them after so each value will match each expression.