To edit and save metadata in editable text box

I am looking to edit and save metadata that is displayed in a editable text box on the widget.
I have used the following blueprints to achieve it and failed. The metadata value sets back to default value, but still creates a .sav file in my saved games.
Any suggestions or help on the same would be great.

You could try doing it like this:

1 Like

Thankyou for your response.
I tried this too but the result is the same, the data isn’t accepting changes and saving it.
We are trying to edit the metadata displayed in a editable text box of a widget, the following is the extraction and displaying of metadata into the particular widget.

Try to do it this way:

  1. Make the variable “Txt” exposed when the widget is created and set text to your text block or another text widget:

  1. Then, iterate your map and create widgets with exposing variables.

My Products

1 Like

Thankyou for you support.
I tried the above changes mentioned by you, the values can be edited now, but it isn’t saving and loading.( i.e if I change value of HVAC toHVAC123 and click save, and check it after some time it still shows HVAC, and I have map of names to strings.)

Show how you made saving and loading, please.
If you check saved data in the same session where you save data, you need to rebuild or update your widgets with new values.

1 Like

Saving and loading is as you suggested earlier. The blueprint is as follows.
Thankyou for your constant guidance.

I don’t see where you save and load the metadata map

1 Like

Thankyou for the quick response.
The metadata is being imported from revit through datasmith and projected on the UI.
I have been trying to make changes in the metadata value projected in editable text box of respective UI and save it, and hence used the above blueprints for it.
Do correct me , if the approach is wrong as I am confused with the save node and its variables.

It looks like you are saving and loading text from a metakey or metavalue widget. If so, each widget has its own save object instance, and they overwrite each other. You need to save the data in the parent widget as a map.
You need to have only one unique save game object instance.

1 Like

This is the blueprint to extract metadata , and is displayed in UI widget with help of metavalue widget.
As you mentioned , i am trying to edit ,save and load metavalue, please guide me to save the maps and there is only one save game instance i.e savemygame.

You should reorganize your widgets structure. I’m preparing instructions on how you could do it.

1 Like

Do you want to save every value separately or all values at the same time?

1 Like

I want to save the value seperately.

Hello there,
two things:

  1. To edit and save metadata in editable text box - #7 by MeghaKK
    When you go to this post, second image, do you use two different SaveGame references?

  2. Where and when do you get your meta data? Do you always get the meta data? Could it be possible that you overwrite your text? like: You get the SaveGame on EventConstruct, populate your list and then the “Get Meta Data” event does gets executed again and overwrites everything with the default values?

1.There is only one save game instance (The Blueprint images shown are in same UI widget )
2.I get metadata when I click on the equipment ,the UI widget displays it .
yes we can edit the values but the next time i call the ui widget it displays the old value not newly edited one.

I mean this:

And about the meta data:
You should only get the meta data once (from data smith) when there is no save game with values for this object.
You can check which event gets executed first via PrintStrings before GetMetaData and before LoadSaveGame

I did just check now the variable type is same for both the nodes

I suggest the following solution:

  1. Create one item widget containing Key and value instead of two separate ones.


  1. When creating a widget, you check if there is a saved value by key and if yes, then apply it. If not, then take the default value.

  1. Save:

    Don’t make any references to avoid overwriting data of other items.

  2. In the Parent widget:

1 Like

Thankyou so much for the detailed solution.
I shall try this now!