Book a Demo

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rogerjohansson

Pages: [1]
1
Hi,
Is it possible to print an object state (Stateflags) in ShapeScript?
Like:
shape label
{
      setfontcolor(0,0,255);
      setOrigin("S",-10,1);
      print("#stateflags#"); //Dont work!!!! Not recognized by EA
   
}

2
It's in t_object.runstate (or EAElement.runstate) where you find something like
Code: [Select]
@VAR;Variable=s1;Value=state1;Op==;@ENDVAR;@VAR;Variable=...
q.
Are you sure? isnt Runstate separate from Object instance state? Two different attributes.
When I use EAElement.runstate it returns the runstate not "Stateflags".
This is an exemple element in XML:
<UML:ClassifierRole name="Test" xmi.id="EAID_AA4F78A0_7A0B_481e_8ED3_A4AF2F924EF7" visibility="public" base="EAID_11111111_5487_4080_A7F4_41526CB0AA00">
<UML:ModelElement.stereotype>
<UML:Stereotype name="AValueObject"/>
</UML:ModelElement.stereotype>
<UML:ModelElement.taggedValue>
<UML:TaggedValue tag="isAbstract" value="false"/>
<UML:TaggedValue tag="isSpecification" value="false"/>
<UML:TaggedValue tag="ea_stype" value="Object"/>
<UML:TaggedValue tag="ea_ntype" value="0"/>
<UML:TaggedValue tag="version" value="0.1"/>
<UML:TaggedValue tag="isActive" value="false"/>
<UML:TaggedValue tag="package" value="EAPK_6E6B9B29_21FC_4364_A5C7_32D799458250"/>
<UML:TaggedValue tag="date_created" value="2023-08-15 13:32:16"/>
<UML:TaggedValue tag="date_modified" value="2023-08-15 14:41:05"/>
<UML:TaggedValue tag="gentype" value="Java"/>
<UML:TaggedValue tag="tagged" value="0"/>
<UML:TaggedValue tag="package_name" value="Nuläge"/>
<UML:TaggedValue tag="phase" value="1.0"/>
<UML:TaggedValue tag="author" value="rojo05"/>
<UML:TaggedValue tag="complexity" value="1"/>
<UML:TaggedValue tag="object_style" value="MDoc=1;"/>
<UML:TaggedValue tag="status" value="Proposed"/>
<UML:TaggedValue tag="stereotype" value="AValueObject"/>
<UML:TaggedValue tag="runstate" value="@VAR;Variable=ThsIsRunnerstate;Op==;@ENDVAR;"/>
<UML:TaggedValue tag="tpos" value="0"/>
<UML:TaggedValue tag="ea_localid" value="115"/>
<UML:TaggedValue tag="ea_eleType" value="element"/>
<UML:TaggedValue tag="stateflags" value="ThisIsInstanceState"/>
<UML:TaggedValue tag="style" value="BackColor=-1;BorderColor=-1;BorderWidth=1;FontColor=-1;VSwimLanes=1;HSwimLanes=1;BorderStyle=0;"/>
<UML:TaggedValue tag="$ea_xref_property" value="$XREFPROP=$XID={F0DE9AFC-6769-43b3-92AA-725A85DC7929}$XID;$NAM=Stereotypes$NAM;$TYP=element property$TYP;$VIS=Public$VIS;$PAR=0$PAR;$DES=@STEREO;Name=AValueObject;FQName=Astrakan::AValueObject;@ENDSTEREO;$DES;$CLT={AA4F78A0-7A0B-481e-8ED3-A4AF2F924EF7}$CLT;$SUP=<none>$SUP;$ENDXREF;$XREFPROP=$XID={276F3CFC-917E-4043-B08F-B9524DF94E10}$XID;$NAM=CustomProperties$NAM;$TYP=element property$TYP;$VIS=Public$VIS;$PAR=0$PAR;$DES=@PROP=@NAME=_defaultDiagramType@ENDNAME;@TYPE=string@ENDTYPE;@VALU=Astrakan Method::ProcessModel@ENDVALU;@PRMT=@ENDPRMT;@ENDPROP;$DES;$CLT={AA4F78A0-7A0B-481e-8ED3-A4AF2F924EF7}$CLT;$SUP=<none>$SUP;$ENDXREF;"/>
<UML:TaggedValue tag="modeldocument"/>
</UML:ModelElement.taggedValue>
</UML:ClassifierRole>

3
Hello!
Im trying to use the automation interface (vbscript) to read and change the object state value for an element.
Its possible to set this value in the user interface via "Rightclick - Advanced - Set Object State..." or CTRL+SHIFT+S shortcut, this brings up the "Set Instance State" dialog. But I struggle to find a way to read or set the same value using vbscript.
In exports I can see that there is column in the t_objects table called ”StateFlags” where this value appears to be stored…

Can I read and/or set this value using automation?

/Roger

Pages: [1]