Jump to content

read txt file via DIESEL


samifox

Recommended Posts

I need to create a simple txt file with path addresses ,

For example, I have few dwg databases for blocks, I want to be able to place a button in the tool palette to open that dwg at any time,

I could set a macro to that that in the button properties, but since I have lots of dwg files I want it to be in a text file.

 

Is there a way I can tell to a button to read a path from a text file?

 

TX

Link to comment
Share on other sites

I don't think that's possible. Here's the best reference that I know of

http://www.crlf.de/Dokumente/Diesel/Diesel.html

 

Do you want one button to open multiple dwg files?

 

You may need to use multiple diesel strings in one macro or write a Lisp script and call that from your button.

 

i wrote a lisp,

but the char "\" is formatting the text.

 

how can i make the interpeter to avoid "/"?

 

(setq root "C:\Dropbox\Autocad\")

(setq p
      (strcat root "csr\zoom.csr")
)

Link to comment
Share on other sites

Try this use double backslash Yz you can have problems if there is a space in the directory name using single forward slash, a bit of history on unix you had to reverse the slashes.

(setq root "C:\\Dropbox\\Autocad\\")
(setq p (strcat root "csr\\zoom.csr"))

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...