View Single Post
  #2  
Old 03-02-1999, 06:24 PM
John van Doorn
Guest
 
Posts: n/a
re: text-reference in annotation-module

Hi Robert, Here is an example for putting the date and the username in the Title block table: This piece of code needs to placed in the am_customize file:

(docu-unregister-tr-group "Sheet_local")
(docu-register-tr-group "Sheet_local" "SHEET")
(docu-register-tr-type "Sheet_local" "SHEET_NO" "???" 'docu::docu-get-current-sheet-name)
(docu-register-tr-type "Sheet_local" "SHEET_SCALE" "???" 'docu::docu_inq_curr_sheet_scale_text)
(docu-unregister-tr-group "Sheet_global") (docu-register-tr-group "Sheet_global" "GLOBAL")
(docu-register-tr-type "Sheet_global" "SHEETS" "???" 'docu::docu-inq-highest-sheet-name)
(docu-register-tr-type "Sheet_global" "DRAWING_NO" "???" 'docu::docu_inq_drawing_number_text)
(docu-register-tr-type "Sheet_global" "DRAWN_BY" "???" 'my-get-username)
(docu-register-tr-type "Sheet_global" "DATE" "???" 'my-tr-get-date)
(defun my-get-username () (sd-sys-getenv "USERNAME"))
(defun my-tr-get-date () (multiple-value-bind (sec min hour day month year) (decode-universal-time (get-universal-time)) (declare (ignore sec) (ignore min) (ignore hour)) (format nil "~2,'0d-~2,'0d-~A" day month year) ) )

If you look to the integration kit manuals, you will find all kind of inq commands that you can use. Good luck