DESCODER: How to access text file in des?

It is possible to combine lsp-files and txt-files into a single des-file. But how can a lsp-file then read from a txt-file in the same des-file?

lsp-file: ReadMyTxt.lsp

(defun ReadMyTxt ( / file line)
(setq file (open "ReadMyTxt.txt" "r"))
(setq line (read-line file))
(close file)
line
)

txt-file: ReadMyTxt.txt

Info from ReadMyText.txt

Comments

  • Dear Roy,
    here it is : (vl-get-resource txtfile)

    <txtfile> is the name of the text file which is included in *.des file ...

    Should work fine ... otherwise, please tell me ...

    Many greetings, Torsten

  • Works perfectly. Thanks you Torsten.

This discussion has been closed.