<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to make Cull pattern</title><link>https://communities.bentley.com/products/products_generativecomponents/f/generativecomponents---forum/167535/how-to-make-cull-pattern</link><description>I have list of objects and I have another list of true false. 
 I wanna make list of all objects are true 
 like this. 
 List1:(Curve 1,Curve 2 ,Curve 3 ) 
 Pattern list:(True,False,True) 
 Expected result: (Curve1,Curve3) 
 
 how can I make this function</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to make Cull pattern</title><link>https://communities.bentley.com/thread/479880?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 16:31:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:4e531e58-f445-47f4-8482-5a60292fd234</guid><dc:creator>ehsan mokhtari</dc:creator><description>&lt;p&gt;thanks alot&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to make Cull pattern</title><link>https://communities.bentley.com/thread/479827?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 12:12:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:76873637-4780-4aab-bd30-7f56c3ed6caa</guid><dc:creator>Robert Jones</dc:creator><description>&lt;p&gt;You could&amp;nbsp;write your own custom function and use it in a function node:&lt;/p&gt;
&lt;p&gt;Something like this should work:&lt;/p&gt;
&lt;div class="mainbody"&gt;
&lt;div class="body conbody"&gt;
&lt;pre class="pre codeblock"&gt;object [] MaskedList(object [] InList, bool [] Mask)&lt;br /&gt;{&lt;br /&gt; object OutList = {};&lt;br /&gt; int c = 0;&lt;br /&gt; for (int i = 0; i &amp;lt; InList.Count; ++i)&lt;br /&gt; {&lt;br /&gt;  if (Mask[i] == true)&lt;br /&gt;  {&lt;br /&gt;   OutList[c] = InList[i];&lt;br /&gt;   ++c;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; return OutList;&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>