MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - making ports of collection property via generator
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

making ports of collection property via generator

 Post Reply Post Reply
Author
Message
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Topic: making ports of collection property via generator
    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?


Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 636
Answer Answer
Post Options Post Options   Thanks (1) Thanks(1)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 08.Sep.2022 at 10:14
Looks like all you are missing is a newline in the inner block Smile
"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
   }
}
Back to Top
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.16
Copyright ©2001-2013 Web Wiz Ltd.

This page was generated in 0.063 seconds.