Author Topic: Creating\Updating RunState attribute  (Read 667 times)

tzafrir

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Creating\Updating RunState attribute
« on: February 01, 2018, 08:04:58 pm »
Hi,

I need to create\update some runstate attributes of element.
element.RunState returns the getter of the current element's runstates.

Is there an API that updates it (setter).
I am trying to avoid using direct update on the DB.

Thanks

Arshad

  • EA User
  • **
  • Posts: 116
  • Karma: +5/-1
    • View Profile
Re: Creating\Updating RunState attribute
« Reply #1 on: February 01, 2018, 08:17:46 pm »
Hi tzafrir

Using the same property itself you can add\update the run state.

Code: [Select]
theElement.RunState = "@VAR;Variable=222;Value=Val2;Op==;@ENDVAR;@VAR;Variable=111;Value=Val1;Op==;@ENDVAR;"
theElement.Update();
theElement.Refresh();

the above code will create two values

 
Variable      Operator     Value
111            =                Val1
222            =                Val2


Regards
Arshad
« Last Edit: February 01, 2018, 08:27:43 pm by Arshad »

Sparx Systems India - Services
Profile | Training PlansConsulting

tzafrir

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Re: Creating\Updating RunState attribute
« Reply #2 on: February 01, 2018, 08:46:30 pm »
thanks