Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT CURENT DATE INTO TEXT

Status
Not open for further replies.

shadow

Computer
Mar 1, 2001
321
0
0
US
ok i want set a button or something to place or replace the date or the following text ?month? dd, yyyy with the corect current date
any body done this before if everyone helps everybody the world will be a better place
 
Replies continue below

Recommended for you

Try some form of this:


;------------------
; Routine: C:TODAY
; Description: Places current date text in selected location
;------------------
(defun c:today (/ layer ts ip)
(setq ip (getpoint "\nInsertion Pt: "))
(command "text" ip (getvar "textsize") "0"
(strcat (substr (rtos (getvar "cdate")) 3 2) "/"
(substr (rtos (getvar "cdate")) 5 2) "/"
(substr (rtos (getvar "cdate")) 7 2)
)
)
(princ)
);end c:today function


Tim
 
Ok but what about an existing peice of text or block attribute??? if everyone helps everybody the world will be a better place
 
I use 2 different files one that updates the date and time. Both of those are separate attibuted blocks and only the ones in the current drawing tab get updated. The other file updates the date and time attributes built into a title block. If any of these interest you send me an email: smotichek@projectconsulting.com.

If you want to update a title block, let me know what the attribute tag is for the date and the format for date and I'll send it to you. The format for the date is currently MM-DD-YY and the time is in military.

SEMott Stephen E. Motichek
Project Consulting Services, Inc.
 
Status
Not open for further replies.
Back
Top