
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 Name | Type | iLogic code |
Author | String | iProperties.Value(“Summary”, “Author”) |
Comments | String | iProperties.Value(“Summary”, “Comments“) |
Keywords | String | iProperties.Value(“Summary”, “Keywords”) |
Last Saved By | String | iProperties.Value(“Summary”, “Last Saved By”) |
Thumbnail | IPictureDisp | iProperties.Value(“Summary”, “Thumbnail”) |
Revision Number | String | iProperties.Value(“Summary”, “Revision Number”) |
Subject | String | iProperties.Value(“Summary”, “Subject”) |
Title | String | iProperties.Value(“Summary”, “Title”) |
Inventor Document Summary Information | ||
Property Name | Type | iLogic code |
Category | String | iProperties.Value(“Summary”, “Category”) |
Company | String | iProperties.Value(“Summary”, “Company“) |
Manager | String | iProperties.Value(“Summary”, “Manager”) |
Design Tracking Properties | ||
Property Name | Type | iLogic code |
Authority | String | iProperties.Value(“Project”, “Authority”) |
Catalog Web Link | String | iProperties.Value(“Project”, “Catalog Web Link”) |
Categories | String | iProperties.Value(“Project”, “Categories”) |
Checked By | String | iProperties.Value(“Project”, “Checked By”) |
Cost | Currency | iProperties.Value(“Project”, “Cost”) |
Cost Center | String | iProperties.Value(“Project”, “Cost Center”) |
Creation Time | Date | iProperties.Value(“Project”, “Creation Time”) |
Date Checked | Date | iProperties.Value(“Project”, “Date Checked”) |
Defer Updates | Boolean | iProperties.Value(“Project”, “Defer Updates”) |
Description | String | iProperties.Value(“Project”, “Description”) |
Design Status | Long | iProperties.Value(“Project”, “Design Status”) |
Designer | String | iProperties.Value(“Project”, “Designer”) |
Document SubType | String | iProperties.Value(“Project”, ” Document SubType”) |
Document SubType Name | String | iProperties.Value(“Project”, ” Document SubType Name”) |
Engineer | String | iProperties.Value(“Project”, “Engineer”) |
Engr Approved By | String | iProperties.Value(“Project”, “Engr Approved By”) |
Engr Date Approved | Date | iProperties.Value(“Project”, “Engr Date Approved”) |
External Property Revision Id | String | iProperties.Value(“Project”, “External Property Revision Id”) |
Language | String | iProperties.Value(“Project”, “Language”) |
Manufacturer | String | iProperties.Value(“Project”, “Manufacturer”) |
Material | String | iProperties.Value(“Project”, “Material”) |
Mfg Approved By | String | iProperties.Value(“Project”, “Mfg Approved By”) |
Mfg Date Approved | Date | iProperties.Value(“Project”, “Mfg Date Approved”) |
Parameterized Template | Boolean | iProperties.Value(“Project”, “Parameterized Template”) |
Part Icon | IPictureDisp | iProperties.Value(“Project”, “Part Icon”) |
Part Number | String | iProperties.Value(“Project”, “Part Number”) |
Part Property Revision Id | String | iProperties.Value(“Project”, “Part Property Revision Id”) |
Project | String | iProperties.Value(“Project”, “Project”) |
Proxy Refresh Date | Date | iProperties.Value(“Project”, “Proxy Refresh Date”) |
Size Designation | String | iProperties.Value(“Project”, “Size Designation”) |
Standard | String | iProperties.Value(“Project”, “Standard”) |
Standard Revision | String | iProperties.Value(“Project”, “Standard Revision”) |
Standards Organization | String | iProperties.Value(“Project”, “Standard Organization”) |
Stock Number | String | iProperties.Value(“Project”, “Stock Number”) |
Template Row | String | iProperties.Value(“Project”, “Template Row”) |
User Status | String | iProperties.Value(“Project”, “User Status”) |
Vendor | String | iProperties.Value(“Project”, “Vendor”) |
Weld Material | String | iProperties.Value(“Project”, “Weld Material”) |
Inventor User Defined Properties | ||
Property Name | Type | iLogic code |
Custom | Varies | iProperties.Value(“Custom”, “PropertyName”) |
Tables based on information show on the Manufacturing DevBlog
You must be logged in to post a comment.