question

Valentin R avatar image
0 Likes"
Valentin R asked Valentin R commented

Adding new button in ExtraPanel and making space for him from a module

Dear reader,

I'm trying to add a new custom button to my flexsim's interface (In the ToolPanel) from a module. I've been inserting it "by addition" from my module which works quite well. However, the next elements on the ToolPanel still need to be moved in order to make space for it. I've then selected the spacialsx of the ExtraPanel, the spacialx of the divider4 and the spacialx of the UserPanel and added them "as replacement" to my module. Then I changed the values:

spacialsx of the ExtraPanel from 273 to 323
spacialx of the divider4 from 836 to 886
spacialx of the UserPanel from 848 to 898

and used the save defaults to try applying the changes. The result of this manipulation can be see on the picture below.

capture.png


I must be doing something wrong because, as it can be seen, the values in the "replace" of the module are still the initial values and only the value of spacialsx of the ExtraPanel has been changed as I wanted. Do you have any idea about what the problem is in this case ?

Thank you all for your consideration,

Val

FlexSim 19.1.0
modulebuttontoolpanel
capture.png (102.5 KiB)
5 |100000

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

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Valentin R commented

Lines 215 - 219 of MAIN:/project/exec/globals/nodefunctions/savedefaultviewproject is setting those values to hard coded numbers. I removed those lines for the 19.1.1 bug fix, so you can either wait till then or you can replace that nodefunction and remove those lines yourself.

· 4
5 |100000

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

Valentin R avatar image Valentin R commented ·

I used the module replace function to replace the values where you mentioned them. Once I "saved default", the modification took place and everything looked as I wanted it. However, if i close FlexSim and reopen it, this modification is not taken into account. At that point, if i simply "save default" it does apply the modification as I want it to. Looks like the openning routine of FlexSim does not act the same way as the interface reopening routine of the "save default" ... Do you have any idea about what is happenning there ?

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Valentin R commented ·

I just tried this on 19.1.1. (It's released now so you don't need to replace the savedefaultviewproject node anymore) It all works fine for me. Are you sure your changes actually got saved? Do you see the nodes in your module's installdata node?

Also I would recommend adding your own toolbar panel instead of adding an item to the Extras panel. This is because the toolbar panel finds the biggest item and sizes all the other items to be the same size. You can see when you hover over the new item you added to the Extras panel that the blue box suddenly cuts off on the right side. And if you were to add two small items to the panel you'd get a big gap between the two.

1 Like 1 ·
Valentin R avatar image Valentin R Matthew Gillespie ♦♦ commented ·

Thank you very much, I tried the 19.1.1 and it works well for the button problem. I still encounter a new error that appeared after some time working on my module in the 19.1.1 version (cf. screenshot linked capture-error.png ). This error appears when opening the FlexSim 19.1.1's version which contains my module. Is this one appearing because the "module SDK" I used was the one of the 19.1 version ?

0 Likes 0 ·
capture-error.png (95.4 KiB)
Show more comments