Author Topic: AutoCAD text...to word..  (Read 3041 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
AutoCAD text...to word..
« on: April 19, 2006, 03:43:26 PM »
Hi all..

Is it possible to export AutoCAD "DTEXT" in a word or txt file ??

thanks.
Keep smile...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #1 on: April 19, 2006, 03:50:18 PM »
yes
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CottageCGirl

  • Guest
Re: AutoCAD text...to word..
« Reply #2 on: April 19, 2006, 03:55:28 PM »
yes

now, that's helpful...isn't it..... :?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #3 on: April 19, 2006, 04:35:32 PM »
To open a file for writing;
Code: [Select]
(setq file_open (open "c:\\name.txt" "w"))then you want to write to it using;
Code: [Select]
(write-line "some string" file_open)when you're done make sure you close the file
Code: [Select]
(close file_open)
that's a start anyway.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #4 on: April 19, 2006, 05:04:43 PM »
and because it's in my contract ..
Code: [Select]
(DEFUN c:txtexport (/ ss ent fh fn hnd index sslen txt)
   ;; codehimbelonga kwb@theSwamp
   (IF (SETQ ss (SSGET '((0 . "TEXT"))))
      (PROGN (SETQ index 0
                   sslen (SSLENGTH ss)
                   fn  (GETFILED "Text Export/Append to File" "" "txt" 1)
             )
             (IF  fn
                (PROGN (SETQ fh (OPEN fn "a"))
                       (WHILE (< index sslen)
                          (SETQ hnd (SSNAME ss index)
                                ent (ENTGET hnd)
                                txt (CDR (ASSOC 1 ent))
                                index (1+ index)
                          )
                          (PRINC (STRCAT txt "\n") fh)
                       )
                       (CLOSE fh)
                )
             )
      )
   )
   (PRINC)
)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: AutoCAD text...to word..
« Reply #5 on: April 19, 2006, 05:31:02 PM »
and because it's in my contract ..

 :lmao:
TheSwamp.org  (serving the CAD community since 2003)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #6 on: April 19, 2006, 07:15:49 PM »
or, a little more efficient, if it makes a difference ..
Code: [Select]
(DEFUN c:txtexport (/ ss  fh fn sslen index )
   ;; codehimbelonga kwb@theSwamp
   (IF (AND (SETQ ss (SSGET '((0 . "TEXT"))))
            (SETQ fn (GETFILED "Text Export/Append to File" "" "txt" 1))
       )
      (PROGN
         (SETQ fh    (OPEN fn "a")
               index -1
               sslen (SSLENGTH ss)
         )
         (WHILE (< (SETQ index (1+ index)) sslen)
            (PRINC (STRCAT (CDR (ASSOC 1 (ENTGET (SSNAME ss index)))) "\n") fh)
         )
         (CLOSE fh)
      )
   )
   (PRINC)
)
« Last Edit: April 19, 2006, 07:26:30 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

LE

  • Guest
Re: AutoCAD text...to word..
« Reply #7 on: April 19, 2006, 07:36:06 PM »
For the $75 USD an hour Mark is paying.... you can also provide the way to do as RTF file no?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #8 on: April 19, 2006, 07:53:20 PM »
hehehehe

with the right incentive, I can provide almost anything    :lol:

sometimes just having my sense of humour appreciated is enough.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Re: AutoCAD text...to word..
« Reply #9 on: April 19, 2006, 10:49:10 PM »
Sounds like someone is looking for a raise in pay.....
I drink beer and I know things....

Arizona

  • Guest
Re: AutoCAD text...to word..
« Reply #10 on: April 20, 2006, 06:28:27 AM »
hehehehe

with the right incentive, I can provide almost anything    :lol:

sometimes just having my sense of humour appreciated is enough.

You have a great sense of humor!!! Are you twice as funny in person? By that I mean, are we missing all the facial expressions, etc...

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #11 on: April 20, 2006, 06:57:20 PM »
don't believe the advertising Arizona, I'm really a grouch .. just sometimes act a little silly or see the rediculous is a situation that isn't there. There is a medical term for it, but the word is too hard to spell.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD text...to word..
« Reply #12 on: April 21, 2006, 09:03:50 PM »
 ... and you're welcome Andrea , any time.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MickD

  • King Gator
  • Posts: 3638
  • (x-in)->[process]->(y-out) ... simples!
Re: AutoCAD text...to word..
« Reply #13 on: April 21, 2006, 09:23:58 PM »
 stop... your killing me :lmao:
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien