cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Exporting drawing text to a text file?

Chris3
20-Turquoise

Exporting drawing text to a text file?

Has anyone come up with a clever way to export drawing text to a test file? I am looking to automate this for a lot of drawings.

 

Right now I am exporting it to a cgm (which is just a text file) and then parsing it to get the text out but that is a cumbersome process. The other way I know how to do it is to save as a PDF and then open the pdf in word and save the word as a text file. Unfortunately I don't have access to the version of word that can open PDFs. I know that acrobat can save to a text file too but I can't automate that with scripting.

 

I also thought about using the find tool and then looping through each note and saving it separately but this doesn't work for all of the text on the drawing.

 

I am also aware that the APIs could do this, but I am not knowledgeable enough to write the code to have the APIs do it.

 

Anyone else have any other ideas? I am using Creo 2


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3
dschenken
21-Topaz I
(To:Chris3)

Years ago it was all in plain text in the file. I extracted text from hundreds of files with a simple script. Now it's all encrypted.

You might also get it out of a dxf file. Not sure if it's easier than parsing a CGM.

One thing I might try is to set AutoIt to do the work. It can run the mouse and select areas of the screen, et al. I'd have it run at night and the weekends as it monopolizes the Window interface when it's got control of the mouse.

AutoIt could also just open the PDF with embedded text and do a select-all on the text, copy it to the clipboard and then paste it into Notepad or whatever you like.

Chris3
20-Turquoise
(To:dschenken)

Thanks for the suggestion but unfortunately I can't install additional software. I opened a ticket with PTC and they couldn't think of a way to do it either so I guess I am stuck with one of the options in my OP.

LiekLam
4-Participant
(To:Chris3)

I have a DXF2Text executable, it converts DXF to text plus I believe its location

so if yo use Pro/Batch to ceate your dxf's then this might do what you need

I've attached a sample of the DXF2Text output and a pdf of the drwing I used for the DXF

Liek

Top Tags