set instance parameter values

set instance parameter values

lrs579
Contributor Contributor
203 Views
2 Replies
Message 1 of 3

set instance parameter values

lrs579
Contributor
Contributor

So I've created a tool in my plug-in to edit parameter values simultaneously.
However I've managed to make it work for type parameter, but when i set values for instance parameters, it saves the value but doesnt refresh that it is shown in the UI

Any idea where I should look into in the API? 

lrs579_0-1747400505106.png

If you see in the screenshot, I tried to set "test" to Kommentare in my code, but I'd have to drag the drop down and select the value for Kommentare

0 Likes
204 Views
2 Replies
Replies (2)
Message 2 of 3

rcrdzmmrmnn
Advocate
Advocate

The fact that the dropdown is showing "test" value seems to me that some elements are correctly being assigned, but for some reason, the element you are selecting is not. Can you verify that? Also, it would help if you post the code. Settings parameters values should be straightforward... Assuming Kommentare is Comments that should be as easy as : 
elem.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS).Set("test");


0 Likes
Message 3 of 3

TripleM-Dev.net
Advisor
Advisor

The text "Test" in the pulldown most likely comes from another element of it's category where the value already was filled in. It doesn't have anything to do with you're code.

 

In you're code try another previously unused value, and it won't show up in the pulldown. If it does the code fills it into another element.

 

So in the Code the parameter isn't actually set. Either a end commit is missing or something else happend.

Without some code we can only speculate.

 

- Michel

 

ps. Element isn't in a group?, and if then the parameter should be set to "Values can vary by groups instances", and as this is a Text parameter that's possible.

0 Likes