Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MMiletic on August 04, 2023, 11:53:26 pm
-
Hello
does anybody know how to change value of TaggedValue.
So basically I want to do something like this.
req = eaRepo.GetElementByGuid("{...}")
req.TaggedValues.GetAt(0) = "Test" # this doesn't work
BR and thank you in advance for your help :)
M.
-
You will need an Udate as well.
q.
-
hey q, thank you for help.
Okay I understand that, but the problems is:
req.TaggedValues.GetAt(0) = "Test"
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
I don't know how to set value of req.TaggedValues.GetAt(0).
-
You need to assign the right object (which getAt delivers). IIRC this has a property Value you need to assign. Somethinng like
obj = req.TaggedValues.GetAt(0)
obj.value = "Test"
obj.update()
(Don't nail me on syntax)
q.
-
Thanks q, that works :)