Message 1 of 4
Updating Drawing Properties before Publishing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a program that will give me prompts (day, month, year) to update my drawing properties and then publish right after. The part I'm struggling on is verifying the user input is in the correct format (MM.DD.YYYY) and then publishing once it has been verified. This is what I have so far:
(defun c:dProps (/ mmIn ddIn yyIn dateVal const)
(setq mmIn (getstring "\n Enter Month: ")) ;Input Month
(setq ddIn (getstring "\n Enter Day: ")) ;Input Day
(setq yyIn (getstring "\n Enter Year: ")) ;Input Year
(setq dateVal (strcat mmIn "." ddIn "." yyin))
(prompt dateVal)
(setq const 0)
(cond
(( /= (setq mmLen (strlen mmIn)) 2 ) (prompt "\n Incorrect Month. ") )
(( /= (setq ddLen (strlen ddIn)) 2 ) (prompt "\n Incorrect Day. ") )
(( /= (setq ddLen (strlen yyIn)) 4 ) (prompt "\n Incorrect Year. ") )
(T setq const 1)
) d
(while
;; THE PART IM STRUGGLING WITH. I WANT A FOR/WHILE LOOP WHERE 'const' IS SET ;;TO '1'.
)