Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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
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.
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.
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