Dayananda Posted 16 hours ago Posted 16 hours ago In my dialog box I am displaying present length of a line in first edit box. Second edit box I am requesting the required length. and while that I want to inactive the first edit box. Please Help Quote
Steven P Posted 11 hours ago Posted 11 hours ago Here are the options for edit boxes: https://help.autodesk.com/view/ACD/2026/ENU/?guid=GUID-38A11AED-DDF5-4ACA-A8BB-1F7901D0AF50 I think if you change is_enabled from true to false it should do what you want, I can't remember jus now how to switch it from one to the other - might be a google thing Quote
rlx Posted 5 hours ago Posted 5 hours ago (edited) you have a command called mode_tile , set it to 0 means enable tile and set it to 1 means disable it. (confusing so think my wife was somehow involved) https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-23ACCF72-9C6F-45C0-A889-9307CC1210C2 lets say your top edit box is called "present_length" , to disable / gray out this edit box you would use (mode_tile "present_length" 1) in example below I've named the edit boxes "eb1" & "eb2" but I have to admit , using a text tile would have been just as easy. (defun tst1 ( $m / f p d r s) (if (and (setq f (vl-filename-mktemp ".dcl"))(setq p (open f "w"))) (progn (write-line (strcat "adjust :dialog {label =\"" $m "\";" ":edit_box {key=\"eb1\";label=\"Present Length\";}" ":edit_box {key=\"eb2\";label=\"Required Length\";}" "spacer;ok_cancel;}") p ) (close p)(gc) (setq d (load_dialog f))(new_dialog "adjust" d) (action_tile "eb1" "(setq s $value)") (action_tile "eb2" "(setq s $value)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (set_tile "eb1" "1000") (mode_tile "eb1" 1) (setq r (start_dialog))(unload_dialog d)(vl-file-delete f) ) ) (if (and (= r 1) (= 'STR (type s)) (/= s "")) s nil) ) (alert (strcat "Required length : " (vl-princ-to-string (tst1 "Adjust bar 2026")))) Edited 4 hours ago by rlx Quote
Steven P Posted 4 hours ago Posted 4 hours ago I'd forgotten mode_tile there, yes, that is the one to go for. Quote
BIGAL Posted 1 hour ago Posted 1 hour ago My $0.05. Why have two edit boxes anyway just display the current value in a single box as you have done. Just edit that value. If you have a limited number of desirable values can put those into make a choice DCL showing the preset values. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.