Print Page | Close Window

making ports of collection property via generator

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: http://www.metacase.com/forums/forum_posts.asp?TID=949
Printed Date: 20.Apr.2024 at 11:59
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: making ports of collection property via generator
Posted By: edward22243
Subject: making ports of collection property via generator
Date Posted: 08.Sep.2022 at 09:20
I have an object AssemblyOperation which has a property object MaterialDef, which has a collection property Inputs of object PhysicalInterfaceIn. See picture below.

Once a MaterialDef property is assigned to AssemblyOperation I want to have ports (in AssemblyOperation) with all the Inputs of the contained collection. I am having trouble achieving this. I only can get the first element of the :Inputs collection.  "foreach :Inputs; " gets syntax error (in the generator).
 
How can I do this?





Replies:
Posted By: stevek
Date Posted: 08.Sep.2022 at 10:14
Looks like all you are missing is a newline in the inner block Smile
https://www.metacase.com/support/55/manuals/mwb/Mw-3_2_9.html#Heading734" rel="nofollow - Workbench Manual 3.2.9, Symbol Editor | Creating | Templates | Template subobject settings
"Generator: use a set of objects retrieved by a generator. The generator must output the objects one per line, and the template will pick up the first Live Code hyperlinked object on each line."
do :AssembledMaterial
{  dowhile :Inputs
   {  :name; newline
   }
}


Posted By: edward22243
Date Posted: 08.Sep.2022 at 10:22
Thanks. That was it.

Sometimes it can take a while to figure this out, so thanks for the quick answer.



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