- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Format Holetable via API
I'm trying to read values from a holetable via API and I'm trying to find out how to parse out the units.
By default the column doesn't have the unit string checked, but I can't find where to modify this through the API. Without the unit string there is no way to tell if this is microns or miles.Formatting can be accessed through the GUI
Alternatively, I can find the units property in the HoleTag. Which is odd in that it doesn't use units, but the other columns do.Units can be seen in the HoleTag property
I went through the EventWatcher in VBA And wasn't finding any anything.
Is this something that Inventor has decided I'm not allowed to modify? Or am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Currently there is no API to get/set the Units Formatting for table column, I logged a user story (INVGEN-21878) for this wish, can you send me a private message with your business case:
1. Is this critical to your project?
2. How many of your customers would be impacted without this API?
3. How would this benefit Autodesk?
You can provide the user story number later to query its status to us.
If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.

Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If you want only to check it up in batch or something then just save this in style library, and update each drawing holetable style from library by script.
in xml i see UnitFormat="0" :
<ColumnItem ColumnWidth="2" DecimalType="0" DisplayUnit="0" FractionStackScale="0.7" FractionStackStyle="-1" FractionalFormat="0" HeadingJustification="1" InUse="1" LeadingZeros="1" Precision="2" PropertyID="1" PropertyMemberID="" PropertySet="{04570C0A-FA19-4d76-A48F-D5A662908B35}" TrailingZeros="1" UnitFormat="0" UnitType="0" ValueJustification="1">
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
@marcin_otręba, Where are you getting your XML data from?
I tried retrieving the "formatted text" value which gives xml data for description cell, but for the position cell it only gives the value of the cell.
I'm building a program to create inspection reports based off the drawings. This means that I need to access all the dimensional data in a predictable manner especially the values and their tolerances.
So to answer your questions
1. Yes, To retrieve correct results it's imperative I know what units the dimension is displaying
2. This would affect any customer who wants to use hole tables in their drawing (which in my field is most of them)
3. As the majority of Autodesk clients don't utilize the API it's difficult to say. But it would make sense that if API access is granted to part of the program, it would stand to reason that the API should have access to everything the GUI has access to.
As the program I'm writing deals with all dimensional formats there are many more issues with API access that I'm finding, but most are solvable by one way or another. This post was only one of those issues that I was unable to solve by myself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
it is from style xml file("HoleTable.xml") in your inventor settings files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Your best bet may be to have a settings menu in the program that lists primary and secondary units.
The user will have to change these if they are switching between metric and imperial templates. I'm not sure what you'd do if the user decides to use multiple units in the same hole table, but in my experience, someone doing this really shouldn't be making drawings in the first place.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I logged a user story for this requirement with number INVGEN-21878, you can provide the number to us to query its status. Here I want to check with you do you just need the API to check/uncheck the Unit String check box, or the API to get and set the Units?
If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.

Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Access to the unit string value would be a nice option, ultimately, it would be most beneficial to have access to the settings in the "Format Column" box. Most specifically access to "Format", "Precision", and "Units" as these determine the functional values of the hole table.
For the time being, I'll be doing something like what @CAD-e-Shack suggested as it seems to be the best option available.