Retrieving Direction of a Proxy Port in Java

MagicDraw OpenAPI, scripting related questions and discussions

Moderator: Moderators

Retrieving Direction of a Proxy Port in Java

Postby praveen.biyyani@ge.com » Wed Jan 09, 2019 2:52 pm

Hello,

I am trying to retrieve the direction of a Proxy Port in my Java code but all I get is null. Here is my code.

Code: Select all
protected static String getPortDirection(Port port) throws Exception {

      Profile sysMLProfile = StereotypesHelper.getProfile(Application.getInstance().getProject(), "SysML");
      final Stereotype portStereotype = StereotypesHelper.getStereotype(Application.getInstance().getProject(), "ProxyPort", sysMLProfile);
      Object directionObj = StereotypesHelper.getStereotypePropertyFirst(port, portStereotype, "direction");

}


Can you please tell me if I am doing it wrong? If yes, can you guide me how to get the direction of a Proxy Port Programmatically?

Kind Regards,
Praveen B
praveen.biyyani@ge.com
Forum Newbie
Forum Newbie
 
Posts: 2
Posts Rating:1
Joined: Mon May 07, 2018 2:45 pm

Return to Programmatic Extendibility

Who is online

Users browsing this forum: No registered users and 3 guests

cron