Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Cisore on June 15, 2012, 08:12:23 pm

Title: Change action's effect with script
Post by: Cisore on June 15, 2012, 08:12:23 pm
Hello,

I'm already post this question into a other topic but I don't have response. I but this question in foreground :

How can I change  the effect of one Action with a script.
I arrived to do this but when I change the effect of ONE action the effect of ALL other existing Action change to.

My code :

                              
Code: [Select]
set elm = diag.Elements.AddNew("MyAction","Action")
elm.Update()

dim p as EA._CustomProperty
for each p in elm.CustomProperties
      if(p.Name="effect") then
            p.Value="new effect"
      end if
next
Title: Re: Change action's effect with script
Post by: Paulus on June 17, 2012, 02:18:04 am
Your script seems correct -but- this is not (yet?) supported, according to the EA Help on CustomProperties for Element Class.

Title: Re: Change action's effect with script
Post by: Cisore on June 18, 2012, 06:25:52 pm
Quote
this is not (yet?) supported, according to the EA Help on CustomProperties for Element Class.

I had seen that, but the documentation is not up-to-date and I had hope that the case for this point.

Thanks for your answer.