<?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: how to Add Region in late binding? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6251263#M9003</link>
    <description>hi,&lt;BR /&gt;it is show " Invalid Object Array" when i createed.&lt;BR /&gt;&lt;BR /&gt;dynamic[] circleObj = new dynamic[1];&lt;BR /&gt;double[] calpt = new double[3];&lt;BR /&gt;calpt[0] = 0; calpt[1] = 0; calpt[2] = 0;&lt;BR /&gt;circleObj[0] = AcadDoc.ModelSpace.AddCircle(calpt, 5);&lt;BR /&gt;// create region&lt;BR /&gt;object[] regionObject;&lt;BR /&gt;regionObject = (object[])AcadDoc.ModelSpace.AddRegion(circleObj); //this can't work.&lt;BR /&gt;&lt;BR /&gt;How to do it?</description>
    <pubDate>Tue, 05 Apr 2016 00:36:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-04-05T00:36:30Z</dc:date>
    <item>
      <title>how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6236190#M9001</link>
      <description>&lt;P&gt;hi, everybody. I want to work in different CAD version, so i use late binding. but there is problem in creating region. Dose anybody knkow how&amp;nbsp;to create rgion in late binding?&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2016 00:39:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6236190#M9001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-27T00:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6237166#M9002</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#000080"&gt;&amp;gt;&amp;gt; but there is problem in creating region.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Which problem?&lt;/P&gt;
&lt;P&gt;Using which code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 11:49:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6237166#M9002</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2016-03-28T11:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6251263#M9003</link>
      <description>hi,&lt;BR /&gt;it is show " Invalid Object Array" when i createed.&lt;BR /&gt;&lt;BR /&gt;dynamic[] circleObj = new dynamic[1];&lt;BR /&gt;double[] calpt = new double[3];&lt;BR /&gt;calpt[0] = 0; calpt[1] = 0; calpt[2] = 0;&lt;BR /&gt;circleObj[0] = AcadDoc.ModelSpace.AddCircle(calpt, 5);&lt;BR /&gt;// create region&lt;BR /&gt;object[] regionObject;&lt;BR /&gt;regionObject = (object[])AcadDoc.ModelSpace.AddRegion(circleObj); //this can't work.&lt;BR /&gt;&lt;BR /&gt;How to do it?</description>
      <pubDate>Tue, 05 Apr 2016 00:36:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/6251263#M9003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-05T00:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/8968935#M9004</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am experiencing the same issue. Were you able to find an answer to this solution? If yes, it would help if you can post the solution that worked for you.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 22:06:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/8968935#M9004</guid>
      <dc:creator>nrjdjjs</dc:creator>
      <dc:date>2019-08-15T22:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9000003#M9005</link>
      <description>&lt;P&gt;I have the same problem as you. If you already have the answer, please let me know. Thank you.&lt;/P&gt;&lt;P&gt;My email: &lt;A href="https://goodfileshare.com/" target="_blank" rel="noopener"&gt;goodfileshare&lt;/A&gt;&lt;A href="http://gmail.com" target="_blank" rel="noopener"&gt;@gmail.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Sep 2019 15:24:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9000003#M9005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-01T15:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9014910#M9006</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;EM&gt;&amp;gt;&amp;gt; I have the same problem as you&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;...using AddRegion with latebinding in VBA?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code works for me:&lt;/P&gt;
&lt;PRE&gt;Sub Example_AddRegion_LB()
    ' This example creates a region from an arc and a line.
    
    Dim curves(0 To 1) As Object

    ' Define the arc
    Dim centerPoint(0 To 2) As Double
    Dim radius As Double
    Dim startAngle As Double
    Dim endAngle As Double
    centerPoint(0) = 5#: centerPoint(1) = 3#: centerPoint(2) = 0#
    radius = 2#
    startAngle = 0
    endAngle = 3.141592
    Set curves(0) = ThisDrawing.ModelSpace.AddArc(centerPoint, radius, startAngle, endAngle)
    
    ' Define the line
    Set curves(1) = ThisDrawing.ModelSpace.AddLine(curves(0).StartPoint, curves(0).EndPoint)
        
    ' Create the region
    Dim regionObj As Variant
    regionObj = ThisDrawing.ModelSpace.AddRegion(curves)
    ZoomAll
    
End Sub&lt;/PRE&gt;
&lt;P&gt;It's from the sample in the VBA help, just modified type "AcadEntity" to "Object"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2019 20:26:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9014910#M9006</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2019-09-09T20:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to Add Region in late binding?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9068193#M9007</link>
      <description>&lt;P&gt;double[] squarePt = new double[12];&lt;/P&gt;&lt;P&gt;squarePt[0]=100;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;squarePt[11]=1000;&lt;/P&gt;&lt;P&gt;dynamic pLineObj = AcadDoc.ModelSpace.AddPolyline(squarePt);&lt;/P&gt;&lt;P&gt;IDispatch[] ents =&lt;BR /&gt;{&lt;BR /&gt;pLineObj&lt;BR /&gt;};&lt;BR /&gt;dynamic[] r = AcadDoc.ModelSpace.AddRegion(ents);&lt;BR /&gt;dynamic profileRegionObject = (dynamic)(r[0]);&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 21:21:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-to-add-region-in-late-binding/m-p/9068193#M9007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-04T21:21:46Z</dc:date>
    </item>
  </channel>
</rss>

