Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: guycolstyle on July 15, 2007, 10:58:18 pm

Title: How to read an Object Run state
Post by: guycolstyle on July 15, 2007, 10:58:18 pm
Good Morning All,
I got a serious problem guys, and I definitely need your help. I did defined some Object Instances in my EA project and I set the run state. Now I need to read this run-state. could somebody tell me how I can handle that
Title: Re: How to read an Object Run state
Post by: Eve on July 16, 2007, 07:01:05 pm
There's a RunState property on an Element.
Title: Re: How to read an Object Run state
Post by: guycolstyle on July 17, 2007, 05:29:36 am
Thanks for the reply.
the RunState property is only available from EA. My question is how to read the run state using the AI. after the first reply, I tried this:
IEnumerator props = element.Properties.GetEnumerator();
while (props.MoveNext())
{
  Property prop = (Property)props.Current;
  Console.WriteLine(element.Name+" : "+prop.Name);
}
and I wasn't able to figure out where the runstate property is. Any other suggestions?
Title: Re: How to read an Object Run state
Post by: «Midnight» on July 17, 2007, 08:42:04 am
Simon,

I cannot find any reference to this property anywhere (Element or otherwise) in the docs for EA 7.0 (build 813) or 6.5 (build 806). Please verify that it has been exposed and documented.

David
Title: Re: How to read an Object Run state
Post by: Eve on July 17, 2007, 01:09:56 pm
It looks like it was exposed in 811, but the documentation was lost for some reason.

The following should have been added to the Element page.



RunStateStringRead/Write. The objects runstate list as a string.
LoadLinkedDocument(String Filename)BooleanLoads the rtf document and from the specified file into the element's linked document.
SaveLinkedDocument(String Filename)BooleanSaves the linked document for this element to the specified rtf file.
Title: Re: How to read an Object Run state
Post by: RoyC on July 17, 2007, 02:48:43 pm
The documentation for this is in the EA Software Developers Kit, which is in Beta release at http://www.sparxsystems.com/bin/SDK.chm.  

We are in the process of moving extension material out of the EA User Guide and into the SDK, which already contains some useful additional information. For a time there will be duplication between the two documents, but (we hope) we will cover everything in one or other of the documents.

Roy Chester (Sparx Systems Technical Documentation Specialist)
Title: Re: How to read an Object Run state
Post by: «Midnight» on July 17, 2007, 03:21:31 pm
Thanks Simon and Roy,

Is the SDK beta open to the public?

David
Title: Re: How to read an Object Run state
Post by: Eve on July 17, 2007, 03:54:13 pm
The SDK currently consists of EA (available to the public) and the additional documentation (currently in a public beta not restricted to registered users)
Title: Re: How to read an Object Run state
Post by: guycolstyle on July 18, 2007, 07:37:20 am
Thanks Guys,
there is definitely a RunState property on the version 7.
I'm still running te version 6.5, I gonna update it
Title: Re: How to read an Object Run state
Post by: jeshaw2 on July 19, 2007, 09:58:28 am
Quote
The documentation for this is in the EA Software Developers Kit, which is in Beta release at http://www.sparxsystems.com/bin/SDK.chm.  

We are in the process of moving extension material out of the EA User Guide and into the SDK, which already contains some useful additional information. For a time there will be duplication between the two documents, but (we hope) we will cover everything in one or other of the documents.

Roy Chester (Sparx Systems Technical Documentation Specialist)

When I opened this document, there was only a subject tree, no pages of information.  Am I missing something about how this document is accessed?
Title: Re: How to read an Object Run state
Post by: «Midnight» on July 19, 2007, 12:25:50 pm
Jim,

It must be 'finger trouble' of some kind. I had no trouble retrieving and reading the file. Try again.

David

PS: If it doesn't work, send me a private message with coordinates and I'll mail it to you.
Title: Re: How to read an Object Run state
Post by: Eve on July 19, 2007, 01:01:50 pm
Quote
When I opened this document, there was only a subject tree, no pages of information.  Am I missing something about how this document is accessed?

CHM files downloaded from internet explorer get silently blocked.  There are a few threads that talk about this in more detail, but to access it go to the file properties and you'll find a button 'Unblock'.
Title: Re: How to read an Object Run state
Post by: jeshaw2 on July 19, 2007, 01:13:29 pm
I'm not having trouble downloading the SDK.chm file.  When I open it, all I see is the topic browser (tree) in the left frame (panel?).  When I click on the topics I get a "This program cannot display the webpage" message. :'(
Title: Re: How to read an Object Run state
Post by: Eve on July 19, 2007, 03:01:37 pm
That's what happens after you download a chm file with internet explorer.  Open the file properties and click the 'Unblock' button.
Title: Re: How to read an Object Run state
Post by: Aaron B on July 19, 2007, 03:34:15 pm
Also, make sure it's saved to a local drive (E.g. your C: drive).  Opening chm files over a network will also fail like you describe.
See http://support.microsoft.com/?kbid=896358
Title: Re: How to read an Object Run state
Post by: jeshaw2 on July 19, 2007, 05:32:57 pm
My problem is resolved.
Thanks guys.  :)