iLogic: Write all iProperties to TXT

Have you ever asked “How do I export all of my iProperties to a text file”?

If you have, you’ve come to the right place. I’ve written an iLogic utility that will export ALL of the iProperties in an Inventor file to a txt file.

Inventor stores 65 iProperties in every file, some of which are hidden from the user interface, but we can get to them through the API. In addition to the 65, there is still the possibility to store even more in Custom, or “user” iProperties. By default, iProperties are broken down into 4 categories

  • Inventor Summary Information – 8 properties
  • Inventor Document Summary Information – 3 properties
  • Design Tracking Properties – 54 properties
  • Inventor User Defined Properties – File/user dependant

This iLogic utility runs through the file and exports all of the standard iProperties and then any custom iProperties, the text file is saved to the same location, and with the same file name as the Inventor document. I have included a handy table at the bottom of this post, which lists the “iLogic Names” of all of the iProperties available, should you wish to interact with them.

The Animated GIF shows the iLogic Code in Action:

Below is the iLogic code, I have used an Array to gather the properties from each of the 4 categories listed above. As my iLogic Code iterates through each of these sections, the text file will always contain all of the properties, including any custom properties that have been added. I’m not happy to have included an “On Error Resume Next” but I have… the error that was coming up, is related to the thumbnail. But the good news is that the code works really well.

'Code by @ClintBrown3D 'Originally posted at https://clintbrown.co.uk/ilogic:-write-all-iproperties-to-txt
On Error Resume Next ' The Thumbnail throws an error, so this is neccessary for now

Dim invDoc As Document : invDoc = ThisApplication.ActiveDocument
oCommandMgr = ThisApplication.CommandManager
Dim invDesignInfo As PropertySet
invDesignInfo = invDoc.PropertySets.Item("Design Tracking Properties")

oWrite = System.IO.File.CreateText("C:\Temp\TEST.txt")'Create and write to a text file

Dim oList As New ArrayList
oList.Add("Design Tracking Properties:")
oList.Add("")

invDoc = ThisApplication.ActiveDocument
invDesignInfo = invDoc.PropertySets.Item("Design Tracking Properties")
Dim invPartNumberProperty As [Property]
For Each invPartNumberProperty In invDesignInfo ' iterate through the commands and write to file
	oList.Add(invPartNumberProperty.Name & " --> " & invPartNumberProperty.Value)
Next
oList.Add("")

'---------------------------------------------------------------------------------------------------------------------
oList.Add("Inventor Summary Information:")
oList.Add("")
invDesignInfo = invDoc.PropertySets.Item("Inventor Summary Information")
For Each UnoInvProp In invDesignInfo
	oList.Add(UnoInvProp.Name & " --> " & UnoInvProp.Value)
Next
oList.Add("")

'----------------------------------------------------------------------------------------------------------------------
oList.Add("Inventor Document Summary Information:")
oList.Add("")
invDesignInfo = invDoc.PropertySets.Item("Inventor Document Summary Information")
For Each UnoInvProp1 In invDesignInfo
	oList.Add(UnoInvProp1.Name & " --> " & UnoInvProp1.Value)
Next
oList.Add("")

'----------------------------------------------------------------------------------------------------------------------
oList.Add("Inventor User Defined Properties:")
oList.Add("")
invDesignInfo = invDoc.PropertySets.Item("Inventor User Defined Properties")
For Each UnoInvProp2 In invDesignInfo
	oList.Add(UnoInvProp2.Name & " --> " & UnoInvProp2.Value)

Next
'Clint = InputListBox("Prompt", oList, Clint, Title := "Title", ListName := "List")
'----------------------------------------------------------------------------------------------------------------------
'Create and write to a text file
oWrite = System.IO.File.CreateText(ThisDoc.PathAndFileName(False) & ".txt")

'Write Array out to String
For Each Item As String In oList
	oWrite.WriteLine(Item)
Next

oWrite.Close()

ThisDoc.Launch(ThisDoc.PathAndFileName(False) & ".txt")'open the file

This version of the code was briefly tested with Inventor 2020.2

Please note that I cannot offer any additional support, this blog post is offered as-is, and is aimed at the more advanced user.

As always, please test all iLogic code extensively on non-production files. Do not use any code in a production environment until YOU have thoroughly tested it and have verified that it works as expected. Always back up any data before running any experimental code. You are ultimately responsible for any iLogic code that you run, so make sure you test it thoroughly!

This site takes absolutely no responsibility for how you use this code in production (see disclaimer)

For reference the tables below show how these iProperties can be accesses using iLogic.

Inventor Summary Information 
Property NameTypeiLogic code
AuthorStringiProperties.Value(“Summary”, “Author”)
CommentsStringiProperties.Value(“Summary”, “Comments“)
KeywordsStringiProperties.Value(“Summary”, “Keywords”)
Last Saved ByStringiProperties.Value(“Summary”, “Last Saved By”)
ThumbnailIPictureDispiProperties.Value(“Summary”, “Thumbnail”)
Revision NumberStringiProperties.Value(“Summary”, “Revision Number”)
SubjectStringiProperties.Value(“Summary”, “Subject”)
TitleStringiProperties.Value(“Summary”, “Title”)
Inventor Document Summary Information
Property NameTypeiLogic code
CategoryStringiProperties.Value(“Summary”, “Category”)
CompanyStringiProperties.Value(“Summary”, “Company“)
ManagerStringiProperties.Value(“Summary”, “Manager”)
Design Tracking Properties
Property NameTypeiLogic code
AuthorityStringiProperties.Value(“Project”, “Authority”)
Catalog Web LinkStringiProperties.Value(“Project”, “Catalog Web Link”)
CategoriesStringiProperties.Value(“Project”, “Categories”)
Checked ByStringiProperties.Value(“Project”, “Checked By”)
CostCurrencyiProperties.Value(“Project”, “Cost”)
Cost CenterStringiProperties.Value(“Project”, “Cost Center”)
Creation TimeDateiProperties.Value(“Project”, “Creation Time”)
Date CheckedDateiProperties.Value(“Project”, “Date Checked”)
Defer UpdatesBooleaniProperties.Value(“Project”, “Defer Updates”)
DescriptionStringiProperties.Value(“Project”, “Description”)
Design StatusLongiProperties.Value(“Project”, “Design Status”)
DesignerStringiProperties.Value(“Project”, “Designer”)
Document SubTypeStringiProperties.Value(“Project”, ” Document SubType”)
Document SubType NameStringiProperties.Value(“Project”, ” Document SubType Name”)
EngineerStringiProperties.Value(“Project”, “Engineer”)
Engr Approved ByStringiProperties.Value(“Project”, “Engr Approved By”)
Engr Date ApprovedDateiProperties.Value(“Project”, “Engr Date Approved”)
External Property Revision IdStringiProperties.Value(“Project”, “External Property Revision Id”)
LanguageStringiProperties.Value(“Project”, “Language”)
ManufacturerStringiProperties.Value(“Project”, “Manufacturer”)
MaterialStringiProperties.Value(“Project”, “Material”)
Mfg Approved ByStringiProperties.Value(“Project”, “Mfg Approved By”)
Mfg Date ApprovedDateiProperties.Value(“Project”, “Mfg Date Approved”)
Parameterized TemplateBooleaniProperties.Value(“Project”, “Parameterized Template”)
Part IconIPictureDispiProperties.Value(“Project”, “Part Icon”)
Part NumberStringiProperties.Value(“Project”, “Part Number”)
Part Property Revision IdStringiProperties.Value(“Project”, “Part Property Revision Id”)
ProjectStringiProperties.Value(“Project”, “Project”)
Proxy Refresh DateDateiProperties.Value(“Project”, “Proxy Refresh Date”)
Size DesignationStringiProperties.Value(“Project”, “Size Designation”)
StandardStringiProperties.Value(“Project”, “Standard”)
Standard RevisionStringiProperties.Value(“Project”, “Standard Revision”)
Standards OrganizationStringiProperties.Value(“Project”, “Standard Organization”)
Stock NumberStringiProperties.Value(“Project”, “Stock Number”)
Template RowStringiProperties.Value(“Project”, “Template Row”)
User StatusStringiProperties.Value(“Project”, “User Status”)
VendorStringiProperties.Value(“Project”, “Vendor”)
Weld MaterialStringiProperties.Value(“Project”, “Weld Material”)
Inventor User Defined Properties
Property NameTypeiLogic code
CustomVariesiProperties.Value(“Custom”, “PropertyName”)

Tables based on information show on the Manufacturing DevBlog