Jump to content

converting cad text to a Microsoft word document


CADPOLE

Recommended Posts

Is there a fast, acurate way to convert a Bill Of Materials done in autocad text (I could convert it to mtext if I have to) onto a word document?

 

I really hate the idea of having to retype this monster if I don't have to.

I am able to do it line by line with ddedit /copy but what a hassel.

there has GOT to be an easier way!

Link to comment
Share on other sites

You can convert multiple text objects into one multitext object. At one time the order of the text didn't necessarily correspond to the order you picked them--I believe they went in according to time of creation, i.e. the oldest first, youngest last.

 

Another possibility, if you have a lot of text, is to convert it to PDF and use OCR. Or these days it's possible that the text itself is passed to PDF and not just as graphic information.

Link to comment
Share on other sites

That's kind of where my brain was swirling around. I was thinking I could plot it to .PDF then save the .PDF as a word doc. Could work. . . . what's the worst that could happen. . . . . don't answer that!

Link to comment
Share on other sites

Stay away form OCR just asking for trouble. PDf text maybe. Why not just use a lisp etc to write out the data then open in Word.

 

Here is a copy column of text

 

; converts column of text to comma seprated file with text value and y value
; put in excell and sort by y value
; by Alan H Nov 2004
(setq x 1)
(while (/= x 4)
 (setq howmany (rtos x 2 0))
 (setq fileto (strcat "c:/temp/setout" howmany))
 (princ fileto)
 (setq fout (open fileto "w"))
 (while (not (setq ss (ssget ))))     
(princ "wow")
   (while (setq en (ssname ss 0))
    ; Entity type
    (setq entyp (cdr (assoc 0 (entget en)))) 
(princ "wow")
   (if (= entyp "TEXT")
   (progn
     (setq xyz (cdr (assoc 10 (entget en))))
     (setq txtht (cdr (assoc 1 (entget en))))
     ;write file out here
     (setq textout (strcat txtht "," (rtos (cadr xyz) 2 3)))
     ;write
     (write-line textout fout) 
     (princ textout)
   )                         
   )                              
   ; Delete each measured entity from set
   (ssdel en ss)
 ;end while
 )
 (close fout)
 (setq x (+ x 1))
) ;end if loop 3 times
(princ)

Another

; ----------------------------------------------------------------------
;               (Exports a selection set of TEXT as picked)
;            Copyright (C) 1998 DotSoft, All Rights Reserved
;                      Website: [url="http://www.dotsoft.com"]www.dotsoft.com[/url]
; ----------------------------------------------------------------------
; DISCLAIMER:  DotSoft Disclaims any and all liability for any damages
; arising out of the use or operation, or inability to use the software.
; FURTHERMORE, User agrees to hold DotSoft harmless from such claims.
; DotSoft makes no warranty, either expressed or implied, as to the
; fitness of this product for a particular purpose.  All materials are
; to be considered ‘as-is’, and use of this software should be
; considered as AT YOUR OWN RISK.
; ----------------------------------------------------------------------
(defun c:txtexprt ()
 (setq sset (ssget '((0 . "TEXT"))))
 (if sset
   (progn
     (setq itm 0)
     (setq num (sslength sset))
     (setq fn (getfiled "Text Export File" "" "txt" 1))
     (if (/= fn nil)
       (progn
         (setq fh (open fn "w"))
         (while (< itm num)
           (setq hnd (ssname sset itm))
           (setq ent (entget hnd))
           (setq stv (cdr (assoc 1 ent)))
           (princ (strcat stv "\n") fh)
           (setq itm (1+ itm))
         )
         (close fh)
       )
     )
   )
 )
 (setq sset nil)
 (princ)
)

Link to comment
Share on other sites

BOM in single line text? Makes me twitch thinking about it. They need to just remove dtext.

 

Convert it all to Mtext and open it for editing and just select it all copy and past into word.

Link to comment
Share on other sites

Mtext ATTRIBUTES are often a pain, text for almost all of my ATTRIBUTES. DTEXT is great for FIELDS as well.

 

My BOMs and Title Blocks etc. are ATTRIBUTES.

Link to comment
Share on other sites

I LOVE lisp routines! Thank you big Al!

 

EMS_5025; Thats crazy talk! Have you ever tried to change mtext size/width/style? Not to be insulting but your comment makes me wonder if you are cad support (those guys LOVE mtext). Mtext is fine for notes but, good luck trying to make it fit in the clients BOM titleblock. SLW210 is right when he says about it being difficult to change the atributes. You have more control with dtext, it is easier to use on small chunks of text. There are some great lisp routines for having dtext align on a .X, .Y, .Z axis. Mtext can make a drafter bald faster than a house full of teenagers.

Link to comment
Share on other sites

EMS_5025; Thats crazy talk! Have you ever tried to change mtext size/width/style?

Yes i have. Justification is key. I find that everything is easier with MTEXT. I don't use DTEXT at all. I'm a civil drafter, if i need to create a chart i use the TABLE command, or use excel and data link it over so all the justifications are set and it works as a unit not individual lines and pieces of text. Where i find Mtext is especially helpful is when you have one long line of text and you need to shorten it and make it half as long but 2 lines. You cant do that with Dtext. Mleaders are great too. Much better than leaders.

Link to comment
Share on other sites

I LOVE lisp routines! Thank you big Al!

 

EMS_5025; Thats crazy talk! Have you ever tried to change mtext size/width/style? Not to be insulting but your comment makes me wonder if you are cad support (those guys LOVE mtext). Mtext is fine for notes but, good luck trying to make it fit in the clients BOM titleblock. SLW210 is right when he says about it being difficult to change the atributes. You have more control with dtext, it is easier to use on small chunks of text. There are some great lisp routines for having dtext align on a .X, .Y, .Z axis. Mtext can make a drafter bald faster than a house full of teenagers.

DText has its uses, but they're getting scarcer - actually these days they're non-existent for me.

 

The issue with "not able to change MText properties" is because you're using it wrong. You're changing its properties inside the edit mode. That's begging for problems if you want to keep all text similar. Why don't you change it the same way you changed DText? I.e. through the properties palette? If you do so this issue doesn't apply any-more.

 

As for placing in a client's BOM table ... I generally create a true table matching the client's instead. That would have saved you a lot of lost-hairs in this "export" scenario as well.

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