question

asb.p avatar image
0 Likes"
asb.p asked Jordan Johnson commented

How to view and edit global table from a GUI?

Hello,

I have a model in which i have numerous table out of which 3-4 tables are important for the user as he need to change the data for different scenarios.

So i have created a GUI in which I am displaying these global tables as shown in the following image.

The issue is after creation of this GUI even it is open/not open I cannot able to open the global table form tool box any more.

Can any one explain what is the reason and what is best way to show Global table from GUI so that they can see and edit the data. Please find the attached model for the same.

Thanks,

Praneeth.

globaltablegui.fsm

FlexSim 18.1.0
global tablegui
pic1.png (26.6 KiB)
pic2.jpg (18.7 KiB)
pic3.jpg (40.2 KiB)
pic4.jpg (17.4 KiB)
globaltablegui.fsm (47.1 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

·
Jordan Johnson avatar image
3 Likes"
Jordan Johnson answered Jordan Johnson commented

If you want to use a standard view out of the tree, use the guifocusclass attribute instead of copying nodes out of the active view:

Doing it this way does not have the problem that you have mentioned.

At this point, however, having this GUI is the same as saving the model with the tables you want open. You could just drag-and-dock all the tabs you need, and then save the model. When anyone opens that model, the window will be open. In the attached model, I have saved an open window, which looks like the one you created in the model you went.

globaltablegui-fixed.fsm


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

asb.p avatar image asb.p commented ·

Hello Jordan,

I have implemented the above concept in my model. Once i am done with my model I have prepared a Library with this GUI in it.

When I try to install this library in new models. I am loosing the connectivity of the my GUI with the tables.

I tried to use onOpen attribute and try to set my objectfocus and repaint the tableview. but it is not working.

objectfocus(tableview) = nodetopath(reftable("GlabalTable2"));

Can you please let me know how to set the Object focus.

Thanks,

Praneeth.

@jordan.johnson
0 Likes 0 ·
issue.jpg (14.5 KiB)
Jordan Johnson avatar image Jordan Johnson ♦♦ asb.p commented ·

Your code should say:

objectfocus(tableview).value = reftable("GlobalTable2");
0 Likes 0 ·
asb.p avatar image asb.p Jordan Johnson ♦♦ commented ·

Hello Jordan,

I have used the above code in onOpen attribute, I can able to view the tables in GUI, But it is throwing the below error when ever the GUI is opened.

exception: FlexScript exception: Property "value" accessed on invalid node. at VIEW:/active/AssemblyBuilder653696288/TC_AssemblyBuilder/Demand/Demand_TableView>eventfunctions/OnPreOpen c: VIEW:/active/AssemblyBuilder653696288/TC_AssemblyBuilder/Demand/Demand_TableView

Can you let me know why this is happening?

Thanks,

Praneeth

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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