Jump to content

I need a lisp for export selected text in drawing and merge with the name


Recommended Posts

Posted

i have some dwg file from some consulating co and they have unic Id located in th drawing --if i wana search them i need searching for that id.....

I need a lisp for export selected text in drawing and merge with the name of that dwg file at the same file or separated txt filename at that folder....any suggestion lisp..

Posted

Take a look at the data extraction command EATTEXT. Maybe it will be of some use to you.

Posted

is this still on your educational copy? Suggest if you doing commercial work then at least switch to nanoCAD and be legit

Posted

What command in nanoCAD would he be advised to use?

  • 2 weeks later...
Posted

icon9.gif I need a lisp for export selected text in drawing and merge with the name

 

i have some dwg file from some consulating co and they have unic Id located in th drawing --if i wana search them i need searching for that id.....

I need a lisp for export selected text in drawing and merge with the name of that dwg file at the same file or separated txt filename at that folder....any suggestion lisp..

Posted
icon9.gif I need a lisp for export selected text in drawing and merge with the name

 

i have some dwg file from some consulating co and they have unic Id located in th drawing --if i wana search them i need searching for that id.....

I need a lisp for export selected text in drawing and merge with the name of that dwg file at the same file or separated txt filename at that folder....any suggestion lisp..

Instead of just repeating yourself, how about showing what you want to do via some posted pics with explanations. Are you sure it is TEXT? Is that what it says when you LIST it?
Posted

If I understand correctly,

perhaps something like this:

 

(defun c:test (/ Ofil s TxtFile tx txt)
 (prompt "\nSelect text with the Id: ")
 (if (and (setq s (ssget ":S" '((0 . "TEXT"))))
   (setq TxtFile (strcat (getvar "dwgprefix") "YourFileName.txt"))
     );; and
   (progn
     (setq tx  (cdr (assoc 1 (entget (ssname s 0))))
    txt  (strcat tx " - " (getvar "dwgname"))
    Ofil (open TxtFile "a")
     )
     (write-line txt Ofil)
     (close Ofil)
   );; progn
 );; if
);; test

 

Henrique

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...