Adaptive Tables

Adaptive Tables

youann21700
Advocate Advocate
212 Views
1 Reply
Message 1 of 2

Adaptive Tables

youann21700
Advocate
Advocate

Morning,

Is it possible to make table columns adapt their width to fit contents? For example, we have automatically populating revision tables that fit into our own revision control system (Vault pro is expensive). We have a fixed area within our drawing template to fit the revision table, but depending on the contents of certain cells, we get poor formatting that we have to fix manually (see pic below).

Can this adjustment be done automatically on table creation?

 

youann21700_0-1725612915979.png

 

0 Likes
213 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @youann21700.  Not sure about the level of automation you seem to be wanting, but I do believe we can create code solution for resizing columns in Inventor drawing tables.  I have one for PartsList and one for RevisionTable, but they are ran manually whenever I want to use them, instead of by any specific events happening.  It is a relatively custom situation though, since different people use different types of fonts, and have different size/area constraints to work within.  Take a look at the following conversation about doing this for PartsList.

https://forums.autodesk.com/t5/inventor-programming-ilogic/auto-fit-columns-in-parts-list/m-p/964784... 

In message 49 of that long conversation, I had a link to a 'contribution post' I made back then which showed a similar example of how to apply the same strategy to a RevisionTable, but those personal contribution post links are all broken now.  I attached a copy of the code in one of my external iLogic rules here, as a text file, for reference.  I also have a very similar version that iterates through all sheets in the drawing, instead of just acting on the active sheet.  There is still a minimal hardcoded scale factor involved (.5) which you may need to adjust to your own liking, because it seems to need to be changes with different fonts font types, and such.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes