Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Alin Dobre on July 29, 2009, 07:09:36 am

Title: IsTabOpen() Method not working
Post by: Alin Dobre on July 29, 2009, 07:09:36 am
Hello,

Has anyone attempted to use the Repository.IsTabOpen() method and has it worked for you. By work I mean has it given you the correct value per the API. I tried using this method to determine if I should create the tab again if it is not shown, or if it already exists. But it always returns a 0 for me. Regardless, if its on the top level or not. Im using version EA Corporate Version 7.5 build 846. Needless to say, it doesn't work thanks in advance.

Regards,

Alin Dobre
Title: Re: IsTabOpen() Method not working
Post by: Alin Dobre on July 29, 2009, 07:12:06 am
And if some of you are wondering, Am I coping the tab name correctly, yes i am :) I even used copy and paste thinking that I was going crazy.

Regards,

Alin Dobre
Title: Re: IsTabOpen() Method not working
Post by: Paolo F Cantoni on July 29, 2009, 10:46:45 am
Hi Alin,

My experience is that EA really needs the appropriate <object>.Update(); and <collection>.Refresh() (and often <container>.Reload()) to make sure "all the ducks are in a row".

When the API response/outcome doesn't seem to reflect what I think has happened, it's usually one of those operations that I've missed out.

I don't have specific experience of your problem, but I'll probably be heading off in your direction soon - so I hope you solve it...

HTH,
Paolo

[EDIT: - case in point: didn't follow my own advice and forgot a DiagramLink.Update() :'( ]