question

Mike Mayer avatar image
0 Likes"
Mike Mayer asked Mike Mayer commented

Parameter table column widths are not saved

Hello,

When Parameter Tables first came out (which are VERY convenient by the way), you could change the Name, Value, Display Units, and Description column widths, just like with Global Table column widths, and then save the model. You do this by clicking on the column header splitter which gives you the double ended arrow. Pretty much like it works for changing Excel column widths.

You'd then be able to save your model, and next time you opened the model to continue working, the Parameter Table and Global Table column widths were the same as when you last saved the model.

However lately (last couple of years actually) the Parameter Table column widths, although they can still be changed in your current FlexSim session, seem to be reset to their default column widths each time I reopen the model. Whereas, the Global Table column widths remain as I set them last time - they do not reset when I reopen the model.

Since this seems to be a change from when Parameter Tables first came out (when their column widths were preserved in a saved model), is there something I can do to prevent these column widths from being reset to default width each time I reopen the model?

Note this is just for the native Parameters table, not the Parameter Table Dashboard GUI you can generate. Speaking of which (and actually a second question), is there also a convenient way to pre-define the corresponding GUI widths in the resulting Parameter Table Dashboard? Sometimes the "Name" is too long in the native Parameter table, and thus winds up wrap-around (or truncated) in the generated Parameter Table Dashboard version. You can manually move stuff around and change widths in the Parameter Table Dashboard in Edit mode (like you can in any Dashboard), but it's a bit clumsy particularly if you wish to change a bunch of things at once. For example, the numeric fields in the Parameter Table Dashboards can be too wide, and I would like to narrow all of their widths for compactness.

Also, can the Parameter Table Dashboard be updated whenever changes are made to the native Parameter Table? Currently, you have to regenerate a new Parameter Table Dashboard when you make changes to the native Parameter table. Maybe a "Regenerate" button or something in Edit mode would do the trick.

As an aside, I notice now that FlexSim asks for a "License Code" below. Although this particular posting is a generic posting for the whole community (including FlexSim engineers and developers), i.e. not necessarily requiring private FlexSim-provided support, I would be hesitant to provide the code in a public post due to IP reasons, since it reveals the name of my company along with what I'm trying to accomplish in FlexSim. Note also that regular day-to-day or even casual, occasional users needing FlexSim-provided support, even if marked as a private posting, may not have access to that license code (only administrators typically have it).

Thank you.

FlexSim 24.1.0
model parameters tablecolumn set
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Mike Mayer, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Mike Mayer commented

The column widths are saved with the model if the parameters table is open - just as any view is saved.

The parameter table view seems to lack the onPreOpen and onClose behaviours that copy the cell width and height to the focus object - and here the focus is not an object type - so I don't see how this could have worked in the past. However it seems a reasonable request so we'll add an issue to the tracker to consider adding this feature.

· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Mike Mayer avatar image Mike Mayer commented ·

Hi Jason,

You mentioned above "The column widths are saved with the model if the parameters table is open - just as any view is saved." so I did a test using a new model, FlexSim 2024 Update 1 (24.1.0).

In the screen clip below, I simply created 5 parameter entries, using the default column widths. I did not change the widths yet. I typed the Description purposely long in order to spill over past the right edge.

1716995473817.png

Then, I changed the column widths using the double-arrow at the column header splitter, to fit the info I had entered - looks good, nice and compact, nothing clipped nor too much whitespace:

1716995522924.png

With those newly modified column widths, I saved the model again then exited FlexSim. When I reopen the model I get this (the original column widths). I did save the model with the parameters table open, but were they actually saved, since they seemed to revert back?

1716995761909.png

I've attached the small test model.

parameter_table_column_width_test.fsm

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ Mike Mayer commented ·
You are correct that this happens now in later versions. Jason has logged this as a ticket for the devs to look at.
0 Likes 0 ·
Mike Mayer avatar image Mike Mayer Sam Stubbs ♦ commented ·
OK thank you Sam, and for the ticket to have it looked at.
0 Likes 0 ·
Mike Mayer avatar image Mike Mayer commented ·

Hi Jason,

Just a followup from earlier this year. Parameter table column (cell) widths are not saved with the model - it seems to always bring up a default cell (column) width for all 4 Parameter table columns whenever I open my model, regardless of whether the Parameter table is currently open (or was open when the model was last saved, before exiting FlexSim).

I did find a workaround, by fiddling with the "cellwidth" values for these treenode entries (note the column 1 is set to 0 because it is the row number column, which is not used in the Parameters table). I had to do a bit of digging in the treenote viewer to find these...

// 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

Oddly this code does not work if the Parameters table is still open from a previously saved session - the column widths revert to some internal default values, presumably after the values above are set during OnModelOpen (and are thus overwritten). However if I open the Parameters table fresh (or simply close it and re-open it), then it does pick-up my custom "cellwidth" values and I do have custom widths showing OK in the Parameters table view.

The thing is, that I've not found a way to retrieve the CURRENT cellwidths (set by the column splitter) - instead, I have to fiddle with the values above and Save, then reset, then re-open the Parameters table.

So my hacky "custom" Parameters table cell widths are saved with my model, but only because I've hard coded my desired cellwidth values into the OnModelOpen and OnModelReset trigger commands above.

So, essentially my hack kinda works even if a bit of a kludge (particularly since my hack is in two different triggers). I think in the end, when someone changes the width of a column in the Parameters table, that width should be saved with the model (like you can with a regular Global Table, and how Excel works).

I recall in some previous versions of FlexSim (when Parameters table were first introduced) the column widths were being saved with the model. I think mention was made that this may be added to a future fix list.

Currently I am using 24.1.1.

Thank you,

Mike Mayer

Goodyear


0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ Mike Mayer commented ·
Hey @Mike Mayer, thanks for the update. We don't know when this might be implemented, but there is still a case in the development tracker, as a suggested improvement, to change Parameter Table cell sizes so they persist like in Global Tables.
0 Likes 0 ·
Mike Mayer avatar image Mike Mayer Logan Gold ♦♦ commented ·
Sounds good Logan - thanks for the reply!


Mike

0 Likes 0 ·