MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - Objects instead of subobject for dynamic ports
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Objects instead of subobject for dynamic ports

 Post Reply Post Reply
Author
Message
Tahir View Drop Down
Major Contributor
Major Contributor


Joined: 01.Mar.2012
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tahir Quote  Post ReplyReply Direct Link To This Post Topic: Objects instead of subobject for dynamic ports
    Posted: 27.Sep.2013 at 12:14
Hi!

I have a graph with several objects (s1...sn). All the objects are subobjects of a main object (m). 

for each s1..sn I am generating dynamic ports. The criteria for ports is the direction property. 

I am wondering if it is somehow possible to use object instead of each subobject while navigating the graph. For example.

foreach .m
{
 if :direction = 'in'
then
id
endif
}



Back to Top
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpt Quote  Post ReplyReply Direct Link To This Post Posted: 27.Sep.2013 at 13:21
Generators allow to access and select subobjects in many ways. If s and m are in different graph types then you need to access the subgraph and the objects there, like for each m:
do decompositions {
  foreach .s; where :direction = 'in' {
    id newline
  }
}
If you need to access only s1..sn which are used in relationships of m1, then you may access them directly from the ports as follows:
foreach .m {
  do #() where :direction = 'in' { /* gives ports connected */
    id newline
  }
}
 
If instances of s and m are in the same graph, then you may access them:

foreach .m {
  foreach .s; where :direction = 'in' {
    id newline
  }
}
When accessing instances of s you may also sort them in different ways, like based on their properties, coordinates etc.
If you have a specific case of metamodel and would like to have one-to-one webmeeting feel free to suggest time (jpt@metacase.com).
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.039 seconds.