can someone help me debug this im at a loss as to where the issue lies
any help is appreciated
(defun c:BLKSRC1 (/ TextFile SearchStr tmpLine endlist Opened txtfile)
(IF (setq blkdir (vl-directory-files "h:/" "*.dwg"))
(if blkdir
(progn
(setq dirname (open "h:\\blocks.txt" "w"))
(foreach i blkdir
(write-line i dirname)
) ;end foreach
(close dirname)
) ;end progn
) ;END IF BLKDIR
) ;END IF
(defun dclmake ()
(setq dclfl (open "blk.dcl" "w"))
(write-line "blk : dialog {" dclfl)
(write-line "label = \"Search For Block...\";" dclfl)
(Write-line ": boxed_column {" dclfl)
(write-line "label = \"Enter Keyword & hit o.k.\";" dclfl)
(write-line ": edit_box {" dclfl)
(write-line " key = \"Line1\";" dclfl)
(write-line " label = \"Keyword:\";" dclfl)
(write-line " edit_width = 50;" dclfl)
(write-line " alignment = centered;" dclfl)
(write-line " fixed_width = true;" dclfl)
(write-line "}" dclfl)
(write-line "ok_cancel;" dclfl)
(write-line "}" dclfl)
(write-line "}" dclfl)
(close dclfl)
);end dclmake
(defun edit_action1 (val)
(if
(and
(setq TextFile "h:\\blocks.TXT")
;(setq
SearchStr (getstring 1 "\n Enter string to search for: ")
(setq SearchStr val)
)
(setq Opened (open TextFile "r"))
) ;and
(while (setq tmpLine (read-line Opened))
(if (vl-string-search (strcase SearchStr) (strcase tmpLine))
(setq EndList (mapcar 'vl-filename-base (cons tmpLine endlist)))
)
)
(close opened)
)
(defun TT ()
(if EndList
(progn
(setq fname (open "h:\\library.lba" "w"))
(foreach i EndList
(write-line (strcat "h:\\slides\\" i ".sld") fname)
(write-line (strcat "H:\\" i ".dwg") fname)
) ;end foreach
(close fname)
) ;end progn
) ;end if
)
(dclmake)
(setq dclid (load_dialog "blk.dcl"))
(if (not (new_dialog "blk" dclid)) (exit))
(action_tile "accept" "(TT)(done_dialog)")
(action_tile "cancel" "(done_dialog)")
(action_tile "Line1" "(edit_action1 $value)")
(start_dialog)
(done_dialog)
(unload_dialog dclid)
(princ)
)