I have determined that my error is within the Challenge_TB_Out.lsp. I still am unable to determine what, exactly the issue is.
Here is a copy of the code:
(defun C:CHTBout ()
(print "you are in K: ftbout")
(setq dwgnme (getvar "DWGNAME"))
(setq homedir (getvar "DWGPREFIX"))
(print "looking for the next line")
(print homedir)
(setq ttlfil (strcat homedir "\\Challengetitleblk.txt"))
; (setq ttlfil (strcat homedir "Challengetitleblk.txt")
(setq ttlfil (open ttlfil "w"))
;THERE WAS AN EXTRA ")" AT THE BEGINNING OF THIS LINE THAT I REMOVED
;SO THAT THE LOAD_ALL_LISP FILE DOESN'T THROW A SYNTAX ERROR
;J.SHORT 05.13.19
(print "after setting ttfil and it is ") (print ttlfil)
; These are the tags that we want
; variables copied to each drawing the in package
;(print "before TAGSOUT")
(print "before TAGSOUT")
(TAGSOUT "Name")
(print "after title_line1 to TAGSOUT")
(TAGSOUT TITLE-CUSTOMER")
(TAGSOUT "TITLE-DESLDR1")
(TAGSOUT "TITLE-DESLDR2")
(TAGSOUT "TITLE-DESSRC1")
(TAGSOUT "TITLE-DESSRC2")
(TAGSOUT "TITLE-DIVISION")
(TAGSOUT "TITLE-DWGNUM")
;(TAGSOUT "DATE_TB")
(TAGSOUT "TITLE-ENG1")
;(print "calling tagsout with date ")
(TAGSOUT "PROGRAM_NAME")
(TAGSOUT "TITLE-ENG2")
(TAGSOUT "TITLE-PACKAGE-DESCRIPTION-LINE1")
;(print "after call to TAGSOUT")
;added 12/2009 for NextGen Titleblock
(TAGSOUT "TITLE-PACKAGE-DESCRIPTION-LINE2")
(TAGSOUT "TITLE-PROG-BOTTOMLINE")
;(TAGSOUT "DIV_NAME")
;(TAGSOUT "PLANT_NAME")
;(TAGSOUT "LOC_ACT")
(TAGSOUT "TITLE-PROGMIDDLELINE")
(TAGSOUT "TITLE-PROGTOPLINE")
(TAGSOUT "TITLE-RELDATE")
(TAGSOUT "TITLE-REVDATE")
(TAGSOUT "TITLE-REVLETTER")
(TAGSOUT "TITLE-SECTION")
(TAGSOUT "TITLE-SHEETNUM")
(TAGSOUT "TITLE-SHT-DESCRIPTION-LINE1")
(TAGSOUT "TITLE-SHT-DESCRIPTION-LINE2")
(TAGSOUT "TITLE-SYS/TOOL")
(TAGSOUT "TITLE-TOTSHEET")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(close ttlfil)
) ; end FTBout
;;
;;Finds Tag Values, All Blocks
;;===========================================================
(defun TAGSOUT (tagname / newv ss1 len count bn en el found attstr)
;(defun TAGSOUT (tagname)
;=================create selection set=======================
(print "at top of TAGSOUT tagname is ") (print tagname)
(setq ss1 (ssget "x" '((0 . "insert") (66 . 1)))
len (sslength ss1)
count 0
)
;(print "len is ")(print len)
(repeat len
;(print "in repeat len")
(setq bn (ssname ss1 count) ;Block Name
en (entnext bn) ;Entity Name
el (entget en)) ;Entity List
;=================loop thru block entities===================
(while (and (= "ATTRIB" (dxf 0 el))
(/= "SEQEND" (dxf 0 el)))
;(print "(dxf 2 el) before if is ")(print (dxf 2 el))
(if (= (dxf 2 el) (strcase tagname))
(progn
;(print "(dxf 2 el) is ")(print (dxf 2 el))
(setq attstr (dxf 1 el))
;(print "(dxf 1 el) is ")(print (dxf 1 el))
(print "attstr is ")(print attstr)
(write-line attstr ttlfil)
;(setq el (subst (cons 1 newv) (assoc 1 el) el))
;(entmod el) ;Modify List
;(entupd bn) ;Update Screen
(setq found "yes") ;Found Tag?
);progn
) ;if
(setq en (entnext en)
el (entget en))
);while
(setq count (1+ count))
;(print "before repeat")
) ;repeat
(if (/= found "yes")
(princ "\nTag Not Found.")
)
(princ "at end of TAGSOUT")
);defun TAGSOUTout.lsp
;======================dxf function==========================
(defun dxf (code elist)
(cdr (assoc code elist))
);dxf
(princ)
;============================================================
Once again, any help is greatly appreciated.
Thanks,
RH