cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save Parameters table column widths (like Global Tables do).

Save Parameters table column widths (like Global Tables do).

This is a follow-up to my original request over a year ago, 05-22-2024, the title is "Parameter table column widths are not saved". 

 

Link:

 

https://forums.autodesk.com/t5/flexsim-forum/parameter-table-column-widths-are-not-saved/m-p/1359030...

 

If you change the widths of Global Table columns and save the model, then exit FlexSim, then reopen the model, the Global Table column widths persist, i.e., they are the same desired width as when you saved the model.  This is good.

 

The same used to also apply to Parameters tables when they first came out years ago.  That is, the Parameter table column widths were persistent across save/reopen, just like Global Tables.  However, they no longer are.  This is not good.

 

Nowadays when you set the column widths in your Parameters table (using the double-ended arrow column splitter), then save your model (regardless of whether the Parameters table is visible or not), exit FlexSim, then open the model again, the Parameters table columns go back to a default column width.  This is not desirable.  They should behave just like Global Table column width adjustments - persistent across save / reopen.  Note the Parameter table column widths are not saved regardless of whether the table view is visible or not.

 

In my original posting there is some feedback from FlexSim that Parameter table column widths WERE being saved, however, when it was examined closer by FlexSim developers, it was discovered that the widths are actually not saved with the model (they are always reset to default widths when reopening the model).  I don't know why the persistent column widths feature for Parameter tables was removed.

 

Since I use Parameter tables quite a bit, and they can get quite long and wide, it's kind of an inconvenience (particularly when doing a presentation) to have to keep resetting the Parameters table column widths manually, particularly the Description, which can get wide.

 

In my original posting, you can also see that I did an obscure code hack to brute-force the Parameter table column widths so that they all change to a desired set of widths on Reset and on Model Open.  It took me a while to figure out where to burrow deep into the Views tree to get this hack to work:

 

// Set Parameters table column widths. This is set in both OnModelReset and OnModelOpen.

views().find("standardviews/tools/ParameterTable/TableView>cellwidth/1").value = 0; // Default 0

views().find("standardviews/tools/ParameterTable/TableView>cellwidth/2").value = 100; // Default 105

views().find("standardviews/tools/ParameterTable/TableView>cellwidth/3").value = 50; // Default 105

views().find("standardviews/tools/ParameterTable/TableView>cellwidth/4").value = 70; // Default 105

views().find("standardviews/tools/ParameterTable/TableView>cellwidth/5").value = 800; // Default 260

 

To take effect, I simply put these code lines into both the OnModelReset and OnModelOpen triggers.  Later, I modified it to look-up each column width value by reference, via creating 5 extra rows in the Parameter table itself, so I could change them on the fly.  Effectively, using the Parameter table to change its own column widths so that they can be more-or-less persistent when saved.   It's a messy hack, but it works.  Note that column 1 cellwidth is always 0 - I discovered that's actually the table's row label column (not used in Parameters tables - only in Global Tables).  Width of 0 effectively hides that column, which is OK.

 

Please consider restoring the capability of the Parameter table columns to be persistent when the model is saved and re-opened.  Perhaps copy the same "save" logic used to preserve the column widths in Global Tables?

 

It actually used to be that way when Parameter tables came out a few years ago.  Then, the feature was removed and Parameter table column widths were no longer being saved; instead being reset to arbitrary defaults (as you see in the FlexScript comments above).

 

Thank you.

 

Mike Mayer

Goodyear

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea