<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: return function with multiple objects in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3009230#M60998</link>
    <description>&lt;P&gt;Thanx a lot!&lt;/P&gt;&lt;P&gt;it helped, and i created now an arraylist to return the objects:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Public Function Drawlines() As ArrayList
        Dim ObjLijn1 As New Line
        Dim ObjLijn2 As New Line
        Dim Lijst As New ArrayList
        ObjLijn1.StartPoint = New Point3d(CenterX + F1, CenterY + Grootte / 2, 0)
        ObjLijn1.EndPoint = New Point3d(CenterX - F1, CenterY - Grootte / 2, 0)
        Lijst.Add(ObjLijn1)
        ObjLijn2.StartPoint = New Point3d(CenterX - Grootte / 2, CenterY + F1, 0)
        ObjLijn2.EndPoint = New Point3d(CenterX + Grootte / 2, CenterY - F1, 0)
        Lijst.Add(ObjLijn2)
        '---Return lijst
        Return Lijst
    End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2011 10:15:24 GMT</pubDate>
    <dc:creator>wbdehaan</dc:creator>
    <dc:date>2011-05-02T10:15:24Z</dc:date>
    <item>
      <title>return function with multiple objects</title>
      <link>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3007354#M60996</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to return multiple objects from a function. can it be done? and how?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;function DrawLines()as object&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;objline1 as new line&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;objline2 as new line&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;[..]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;return 'objects'&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sub Main&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;Dim Group1 as new Arraylist&lt;/P&gt;&lt;P&gt;&lt;SPAN style="white-space: pre;"&gt;&lt;/SPAN&gt;Group1.Add(DrawLines())&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards Wouter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2011 06:32:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3007354#M60996</guid>
      <dc:creator>wbdehaan</dc:creator>
      <dc:date>2011-04-29T06:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: return function with multiple objects</title>
      <link>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3007558#M60997</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the simplyest way to do it is to return an array of lines (or entityes) from your function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function DrawLines()as line()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Dim ArOut() As line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [···]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Rerutn ArOut&lt;/P&gt;&lt;P&gt;End Function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But you may also return a "collection", a "list (Of line)" or another thing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2011 11:38:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3007558#M60997</guid>
      <dc:creator>alberto_manero_geograma</dc:creator>
      <dc:date>2011-04-29T11:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: return function with multiple objects</title>
      <link>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3009230#M60998</link>
      <description>&lt;P&gt;Thanx a lot!&lt;/P&gt;&lt;P&gt;it helped, and i created now an arraylist to return the objects:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    Public Function Drawlines() As ArrayList
        Dim ObjLijn1 As New Line
        Dim ObjLijn2 As New Line
        Dim Lijst As New ArrayList
        ObjLijn1.StartPoint = New Point3d(CenterX + F1, CenterY + Grootte / 2, 0)
        ObjLijn1.EndPoint = New Point3d(CenterX - F1, CenterY - Grootte / 2, 0)
        Lijst.Add(ObjLijn1)
        ObjLijn2.StartPoint = New Point3d(CenterX - Grootte / 2, CenterY + F1, 0)
        ObjLijn2.EndPoint = New Point3d(CenterX + Grootte / 2, CenterY - F1, 0)
        Lijst.Add(ObjLijn2)
        '---Return lijst
        Return Lijst
    End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2011 10:15:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/return-function-with-multiple-objects/m-p/3009230#M60998</guid>
      <dc:creator>wbdehaan</dc:creator>
      <dc:date>2011-05-02T10:15:24Z</dc:date>
    </item>
  </channel>
</rss>

