question

Fiona Kattenstroth avatar image
0 Likes"
Fiona Kattenstroth asked Fiona Kattenstroth commented

How can I edit the start and end time in a dashboard?

I'd like to edit the start and end time of my simulation in a dashboard. But there are two problems: The first one is that I don't know how to sample the stop time. Another one is that as soon as I sample the start time in an editable field it switches to a different date format. I'd like to have something like a date picker like it's shown in the model settings. Please let me know if you have any ideas how to solve the problem. Thank you in advance!

test model setting start and end date.fsm

FlexSim 18.2.3
flexsim 18.2.3start timestop time
· 3
5 |100000

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

tannerp avatar image tannerp commented ·

@fiona.k,

This might not be the answer for which you are looking, but you can see how the model's Start and Stop times are structured in the tree here:

As you can see, they're not simply a single variable, but rather a package of variables that are carefully formatted. You can play around with these to alter them, but I'm not sure exactly how to do so. Hope this helps.

0 Likes 0 ·
Fiona Kattenstroth avatar image Fiona Kattenstroth commented ·

@tanner.p

I am now able to set the start and end time by an editable field. But I don't want the user to write the date. It'd be better, if I could implement a field that works like the date picker in the model settings for the Model Start Time. Do you have any idea how the user can pick the date in a dashboard?

0 Likes 0 ·
date-picker.png (27.5 KiB)
Braydn T avatar image Braydn T Fiona Kattenstroth commented ·

As far as I can tell. there is not anything like the picker available to be put into a dashboard. Maybe you could have a button that opens the model settings GUI?

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Fiona Kattenstroth commented

test-model-setting-start-and-end-date_1.fsm

If you right-click a window in FlexSim, you can select the 'View > Explore structure' option to see the tree structure that defines that UI.

For example, an open Model Settings view is shown below:

You can add your own GUIs to your model using the Toolbox UI:

You can copy/paste the widget tree definitions from the Model Settings view to your Custom GUI.

You can add a GUI Class object to a Dashboard in order to link a dashboard widget to a GUI that is defined with the GUI Builder:

The particular widgets that you are trying to use are complicated in that their values are set by the Model Settings window's OnPreOpen event and applied in the Model Settings window's OnClose event.

You don't have those two events in a dashboard widget, so you can use a coldlinkx attribute to get a callback when the UI is refreshed or applied. Then you can add an OnKillFocus attribute to the StartTime and StartDate widgets to immediately apply them when they are changed.

Attached is an example model showing all of this configured this way.


· 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.

Fiona Kattenstroth avatar image Fiona Kattenstroth commented ·

@phil.bobo
That's exactly what I'm looking for. Thank you very much

0 Likes 0 ·