Print Page | Close Window

Objects instead of subobject for dynamic ports

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=726
Printed Date: 27.Mar.2026 at 00:36
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: Objects instead of subobject for dynamic ports
Posted By: Tahir
Subject: Objects instead of subobject for dynamic ports
Date 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
}






Replies:
Posted By: jpt
Date 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 ( mailto:jpt@metacase.com" rel="nofollow - jpt@metacase.com ).



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.05 - http://www.webwizforums.com
Copyright ©2001-2022 Web Wiz Ltd. - https://www.webwiz.net