Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Revdate, can it be used in AutoCAD 2000?

Status
Not open for further replies.

Unionswitch

Electrical
Nov 18, 2002
3
AutoCAD LT 2000 incorporates a command called "revdate".

This command allows the user to place a block on a drawing containing the Date and Time and other file info. After this block has been placed on the drawing the user can update the information in this block by typing "revdate" into the command line.

However AutoCAD 2000 does not recognise revdate as a valid command?

Is there any way to get AutoCAD 2000 to update the revdate block placed in a drawing by an AutoCAD LT 2000 user?
 
Replies continue below

Recommended for you

It is a block with attributes. You can use LISP to create a routine to edit it. The first attribute is based on the name and company when the software was installed and I am not surehow to access this info but the other values (date and drawing name are easily accessed and updated). Is this what you needed or are you looking for a program to do this?

BU
 
Unfortunately I am not a LISP expert but at least now I know this can be done, so now I will investigate further. Thanks.

Do you know if I could make my save function also automatically update the date and time in the revdate block? Currently we are using this block to verify that our hard copy drawings match the soft. (Simple I know but effective.) However this routine requires the CAD user to use the revdate command and this can be forgotten. If the revdate command could be automated as part of the save function that would be great.
 
Save the following as REVDATE.lsp and then load this application. You can redefine the save routine if you want but the program as is has no error checking in case the block would not exist in the drawing. Let me know.

(defun C:REVDATE ()
(setq REVBLK (ssget "X" '((2 . "REVDATE")))
ENAME (cdr (assoc -1 (setq ENTDATA (entget (ssname REVBLK CNT)))))
TAG "REVDATE"
TIME (GETTIME)
NEWLIST (cons TAG TIME)
)
(CHANGEATTS (list ENAME NEWLIST))
(princ)
)

;------------------------------------------------------------------------------
(defun GETTIME (/ CDATE HR NEWDATE)
(setq CDATE (rtos (getvar "CDATE") 2 6)
NEWDATE (strcat
(substr CDATE 5 2)
"/"
(substr CDATE 7 2)
"/"
(substr CDATE 3 2)
" "
(if (> (atoi (setq HR (substr CDATE 10 2))) 12)
(itoa (+ (atoi HR) 12))
HR
)
":"
(substr CDATE 12 2)
" "
(if (> (atoi (substr CDATE 10 2)) 11)
"PM"
"AM"
)
)
)
)
;FROM ACADX SITE---------------------------------------------------------------
(defun CHANGEATTS (LST / ITEM ATTS)
(vl-load-com)
(if (safearray-value
(setq ATTS (vlax-variant-value
(vla-getattributes (vlax-ename->vla-object (car LST)))
)
)
)
(progn
(foreach
ITEM (cdr LST)
(mapcar
'(lambda (X)
(if (= (strcase (car ITEM)) (strcase (vla-get-tagstring X)))
(vla-put-textstring X (cdr ITEM))
)
)
(vlax-safearray->list ATTS)
)
)
(vla-update (vlax-ename->vla-object (car LST)))
)
)
)
(princ)
(princ "\nType REVDATE at command line")
 
HI,
Unionswitch, take o look at thread555-29186 .
Few diesel rotines are placed there.

Zmei
 
Turns out to be simple, at least on my Acad LT 2000. Just select the block prior to typing the revdate command; voila, it is updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor