Thanks for the tip. Now I can check for the copyright xdata than I have always placed on layer "0".
I will set the standard based upon the "DWG_OWNED_BY" name. This xdata is set whenever I save the drawing.
It works smoothly now, whenever I open a saved drawing with the copyright xdata.
(defun ARCH:SetXdata (/ tdcreate appname data elist ent item lyr n table datst crdate dwginfo)
(ARCH:DATE2)
;;(setq TDCREATE (menucmd (strcat "M=$(edtime,$(getvar,tdcreate),MON\" \"DD\" \"YYYY)")))
(setq TDCREATE (menucmd (strcat "M=$(edtime,$(getvar,tdcreate),YYYY)")))
(setq DATST (rtos (getvar "CDATE") 2 16)
CRDATE (substr DATST 1 4))
(setq ARCH#XDCn (strcat "Date:" "\t\t" "©" TDCREATE " [Saved: " ARCH#DATE "]\n"))
(setq ARCH#XDAD (strcat "Address:" "\t\t" "City, State. xxxxx"))
(setq ARCH#XDTP (strcat "Phone:" "\t\t" "972.533.9577"))
(setq ARCH#XDWW (strcat "Email:" "\t\t" "Your Website.com"))
(setq ARCH#XDPR
(strcat "Copyrighted by:"
" Your Name All rights reserved by the author."))
(setq appname "DWG_OWnED_BY")
(regapp appname)
(setq item nil
data nil)
(setq item (cons ARCH#XDWW
(cons ARCH#XDTP (cons ARCH#XDAD (cons ARCH#XDCn (list ARCH#XDPR))))))
(setq n 1)
(foreach
S item
(setq elist (set (read (strcat "X" (itoa n))) (cons 1000 S)))
(setq data (cons elist data))
(setq n (1+ n)))
(setq table (list (list -3 (cons appname data))))
(setq lyr (tblobjname "layer" "0"))
(setq ent (entget lyr))
(entmod (append ent table))
(princ (setq table (cdadr (assoc -3 table))))
(princ))
(defun CAD:Standard (/ xda)
(setq XDA (cdadr (assoc -3 (entget (tblobjname "layer" "0") (list "DWG_OWnED_BY")))))
(princ "\n*** ------ No Copyright Xdata Found ------ ***")
(if (/= XDA nil)
(cond
((= (cdar XDA) "Copyrighted by: Gary D Fowler All rights reserved by the author.")
(C:GDF))
((= (cdar XDA) "Copyrighted by: Covert + Associates, LLC All rights reserved.")
(C:A+A))
((= (cdar XDA) "Copyrighted by: PM Design, Inc. All rights reserved.")
(C:PMD))
((= (cdar XDA) "Copyrighted by: Architettura, Inc. All rights reserved by the author.")
(C:FWP))
((= (cdar XDA) "Copyrighted by: Builders Plan Service, LLC All rights reserved.")
(C:BPS))
)
)
(princ))