
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day every one!!!..
I need some help in some COND statement....
I have 3 COND statement to grab the project number from the path of the Dwg at the time I need to plot...
the first 2 work OK, but the third is the one I can't make it work ....
If the user change the project number I need to set the FLAG = "!ALERT"
where is my error? please help...
(defun ProjectNumber ()
(setq SplitDwgPrefix (splitdirs (getvar "dwgprefix"))) ; ("U:" "100000" "elec")
(setq GetDrive (nth 0 SplitDwgPrefix)) ; "U:"
(setq DWG_PATH (getvar "dwgprefix")) ; get the path of the files => "U:/100000/elec/"
(setq user_name (getvar "loginname"))
(setq PNumber (nth 1 SplitDwgPrefix)) ; "\\100000\\"
(set_tile "jobnumber" PNumber)
(setq PNumber0 (get_tile "jobnumber"))
(cond
; If is Drive "U" and Project Number is not changed manually
( (and (= GetDrive "U:") (= PNumber0 PNumber)
(setq jobnumber PNumber)
(setq Flag "---")
(alert (strcat jobnumber " Cond1"))
)
)
; If Project number is NIL and is not in drive "U"
( (/= GetDrive "U:")
(progn
(ProjectNumberDCL "Please... Enter Project Number... " " * Project Number *" "0000.00")
(setq jobnumber PrjNumber)
(setq Flag "!ALERT")
(alert (strcat jobnumber " Cond2")) ; for testing only
)
)
; if the Project Number is changed manually --- IS NOT WORKING.!!
( (/= PNumber PNumber0)
(progn
(setq PNumber1 (get_tile "jobnumber"))
(setq jobnumber PNumber1)
(setq Flag "!ALERT")
(alert (strcat jobnumber " Cond3")) ; for testing only
)
)
) ; cond
jobnumber
) ; defun
at the OK button I have this.....to re-check the project number
(action_tile "accept" "(mplt_chkl)(projectNumber)(mplt_Info)")
(action_tile "cancel" "(done_dialog)")
at the DCL file that section is .....
: boxed_column {
fixed_width = true;
fixed_height = true;
label = "Job Number:";
: edit_box {
key = "jobnumber";
width = 12;
height = 1;
}
spacer;
}
Solved! Go to Solution.