Book a Demo

Author Topic: Accessing Boundary in a use case diagram  (Read 3910 times)

pH

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Accessing Boundary in a use case diagram
« on: June 18, 2010, 10:19:34 pm »
Hi,
Can some one help me how to access "boundary" in a use case diagram through script or APIs?  

Thanks,
pH
<a href="http://webuml.org"><img src="http://webuml.org/images/webuml-badge.png" alt="Set UML Free!" style="border-width:0"></a>

beginner

  • Guest
Re: Accessing Boundary in a use case diagram
« Reply #1 on: June 18, 2010, 11:15:15 pm »
It's an element with ObjectType == "Boundary". You can find it in the according package or via the diagram element.

There's a forum for API questions here...

b.

pH

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Accessing Boundary in a use case diagram
« Reply #2 on: June 19, 2010, 03:23:53 am »
Hi,
I am using it as below.
Using GetDiagramObjects() I am getting all diagram objects and then
checking if object type == Boundary in the following way.

if(((DiagramObject)(diagramObjects.GetAt((short) j))).GetObjectType().equals("Boundary"))

Is this the right way? I am not getting right results..Some thing seems wrong.

Thanks for informing about the API forum..
<a href="http://webuml.org"><img src="http://webuml.org/images/webuml-badge.png" alt="Set UML Free!" style="border-width:0"></a>

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Accessing Boundary in a use case diagram
« Reply #3 on: June 19, 2010, 03:51:43 am »
What language ist this? And where does the function GetObjectType come from?

I think you need to use DiagramObject.ElementID, Repository.GetElementByID, and then Element.Type, which should return a string "Boundary".

pH

  • EA User
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Accessing Boundary in a use case diagram
« Reply #4 on: June 23, 2010, 03:49:14 pm »
GetObjectType is defined in Java API.
I achieved that using below code. Thanks to beginner for his suggestion.

        for(int j=0;j<diagramObjects.GetCount();j++)
        {        
            if(r.GetElementByID((diagramObjects.GetAt((short) j)).GetElementID()).GetType().equalsIgnoreCase("Boundary"))
          {            
                        print("i am boundary");
          }
        }
<a href="http://webuml.org"><img src="http://webuml.org/images/webuml-badge.png" alt="Set UML Free!" style="border-width:0"></a>