Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Fill in drawing title block from text file

Anonymous

Fill in drawing title block from text file

Anonymous
Not applicable

I'm a new Inventor user (previously Creo). I can't figure out how to fill the drawing title block automatically. We have an Excel database, which creates a text file with the right datas (drill angle, connection, material, main dimension, etc.). Previously in AutoCAD (what my colleagues use) we can fill the title block from a .txt file with the "ATTIN"  command. It is fast and accurate. In Creo you can write "mapkeys".

And now I find out, if I go to iProperties -> Custom I can make values, which I can fill the title block. But I can change the values manually and it's slow. Is it any way to do this automatically? because I have the text file, I just need to import it somehow.

Reply
395 Views
1 Reply
Reply (1)

mcgyvr
Consultant
Consultant

@Anonymous 

Can you provide an example "text" file we can use to write a program for you?

 

Inventor can use a type of programming called "ilogic" which can perform tasks like reading from Excel or text files and perform automatic actions based on that. 

If you provide us a sample text file someone can help you develop code to do what you want with it.

 

Please also provide specific details on which line or words or whatever get assigned to which specific custom iproperties,etc...

 

If you just wanted a "hint" as to what direction to head in to see if you can write the code yourself then here is a little hint.. 

 

oFile = "C:\Example.txt"

oRead = System.IO.File.OpenText(oFile)

'read the file
oRead = System.IO.File.OpenText(oFile)
EntireFile = oRead.ReadToEnd()
oRead.Close()


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269