×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Revdate, can it be used in AutoCAD 2000?

Revdate, can it be used in AutoCAD 2000?

Revdate, can it be used in AutoCAD 2000?

(OP)
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?

RE: Revdate, can it be used in AutoCAD 2000?

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

RE: Revdate, can it be used in AutoCAD 2000?

(OP)
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.

RE: Revdate, can it be used in AutoCAD 2000?

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")

RE: Revdate, can it be used in AutoCAD 2000?

HI,
Unionswitch, take o look at Thread555-29186 .
Few diesel rotines are placed there.

Zmei

RE: Revdate, can it be used in AutoCAD 2000?

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources