Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mariusz on October 14, 2010, 02:02:45 am

Title: Problem with setting STATUS attribute via AI
Post by: mariusz on October 14, 2010, 02:02:45 am
Hi

I have problem with setting STATUS attribute (for Interface) via Automation Interface.

My code is simple:

Element pElem=repo.GetElementByGuid("MY_GUID")
pElem.SetStatus("MY_STATUS")
pElem.Update()
println pElem.GetStatus()

In result, I get "MY_STATUS" in my console, and that it is ok.

Unfotunately, this change is unvisible via Eterprise Architect, the status of my Interface is set to NULL. Why?


Best regards
mario
Title: Re: Problem with setting STATUS attribute via AI
Post by: Geert Bellekens on October 15, 2010, 07:09:51 pm
Have you checked the returnvalue of update() If False check GetLatestError().

Geert
Title: Re: Problem with setting STATUS attribute via AI
Post by: mariusz on October 19, 2010, 11:15:40 pm
Quote
Have you checked the returnvalue of update() If False check GetLatestError().

Geert

You are right!
There was an error in Update() operation. My status  had a space after name!
Now everything is ok

Thanks