Book a Demo

Author Topic: Problem with setting STATUS attribute via AI  (Read 3877 times)

mariusz

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Problem with setting STATUS attribute via AI
« 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
« Last Edit: October 14, 2010, 02:07:01 am by kjezyna9 »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13505
  • Karma: +572/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with setting STATUS attribute via AI
« Reply #1 on: October 15, 2010, 07:09:51 pm »
Have you checked the returnvalue of update() If False check GetLatestError().

Geert

mariusz

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Problem with setting STATUS attribute via AI
« Reply #2 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