<?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: RemoveItems - Does it work in VB.NET?? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237625#M74836</link>
    <description>This is what I have done to remove items from a selection set using the &lt;BR /&gt;
ActiveX API through vb.net:&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
             'build a selectionset filtering first for appname xdata&lt;BR /&gt;
             GeoSS = CreateSelectionSet(AcadApp, "XdataSelectionSet")&lt;BR /&gt;
             gpCode(0) = -3&lt;BR /&gt;
             gpCode(1) = 1001&lt;BR /&gt;
             dataValue(1) = "CTTB"&lt;BR /&gt;
&lt;BR /&gt;
             GeoSS.Select(AcSelect.acSelectionSetAll, , , gpCode, dataValue)&lt;BR /&gt;
&lt;BR /&gt;
             For Each XdataObject In GeoSS&lt;BR /&gt;
                 XdataObject.GetXData("", xtypeOut, xdataOut)&lt;BR /&gt;
                 If xdataOut(1) = TopGUID Then&lt;BR /&gt;
                     XdataObject.Delete()&lt;BR /&gt;
                 End If&lt;BR /&gt;
                 'Stop&lt;BR /&gt;
             Next&lt;BR /&gt;
&lt;BR /&gt;
             AcadApp.Update()&lt;BR /&gt;
&lt;BR /&gt;
         Catch ex As Exception&lt;BR /&gt;
             MsgBox("Failed to erase geometry.")&lt;BR /&gt;
&lt;BR /&gt;
         End Try&lt;BR /&gt;
PellaCAD wrote:&lt;BR /&gt;
&amp;gt; Could anyone show an example of removing a subset of entities from an existing selection set via RemoveItems?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am starting to think it is not possible. I find many examples of VBA solutions, but when I try to convert them to VB.NET...RemoveItems treats the object SS as a method rather than a "target" but putting the element array in parenthesis.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; If for some reason this functionality is not available to VB.NET users...what is the solution for removing a subset of entities from a selection set? (...or simulating this action.)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Or maybe I don't have any idea what the heck I'm doing...&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Any help gratefully received.</description>
    <pubDate>Tue, 22 Apr 2008 16:18:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-04-22T16:18:30Z</dc:date>
    <item>
      <title>RemoveItems - Does it work in VB.NET??</title>
      <link>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237624#M74835</link>
      <description>Could anyone show an example of removing a subset of entities from an existing selection set via RemoveItems?&lt;BR /&gt;
&lt;BR /&gt;
I am starting to think it is not possible. I find many examples of VBA solutions, but when I try to convert them to VB.NET...RemoveItems treats the object SS as a method rather than a "target" but putting the element array in parenthesis.&lt;BR /&gt;
&lt;BR /&gt;
If for some reason this functionality is not available to VB.NET users...what is the solution for removing a subset of entities from a selection set? (...or simulating this action.)&lt;BR /&gt;
&lt;BR /&gt;
Or maybe I don't have any idea what the heck I'm doing...&lt;BR /&gt;
&lt;BR /&gt;
Any help gratefully received.</description>
      <pubDate>Tue, 22 Apr 2008 15:13:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237624#M74835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-22T15:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveItems - Does it work in VB.NET??</title>
      <link>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237625#M74836</link>
      <description>This is what I have done to remove items from a selection set using the &lt;BR /&gt;
ActiveX API through vb.net:&lt;BR /&gt;
&lt;BR /&gt;
Try&lt;BR /&gt;
             'build a selectionset filtering first for appname xdata&lt;BR /&gt;
             GeoSS = CreateSelectionSet(AcadApp, "XdataSelectionSet")&lt;BR /&gt;
             gpCode(0) = -3&lt;BR /&gt;
             gpCode(1) = 1001&lt;BR /&gt;
             dataValue(1) = "CTTB"&lt;BR /&gt;
&lt;BR /&gt;
             GeoSS.Select(AcSelect.acSelectionSetAll, , , gpCode, dataValue)&lt;BR /&gt;
&lt;BR /&gt;
             For Each XdataObject In GeoSS&lt;BR /&gt;
                 XdataObject.GetXData("", xtypeOut, xdataOut)&lt;BR /&gt;
                 If xdataOut(1) = TopGUID Then&lt;BR /&gt;
                     XdataObject.Delete()&lt;BR /&gt;
                 End If&lt;BR /&gt;
                 'Stop&lt;BR /&gt;
             Next&lt;BR /&gt;
&lt;BR /&gt;
             AcadApp.Update()&lt;BR /&gt;
&lt;BR /&gt;
         Catch ex As Exception&lt;BR /&gt;
             MsgBox("Failed to erase geometry.")&lt;BR /&gt;
&lt;BR /&gt;
         End Try&lt;BR /&gt;
PellaCAD wrote:&lt;BR /&gt;
&amp;gt; Could anyone show an example of removing a subset of entities from an existing selection set via RemoveItems?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I am starting to think it is not possible. I find many examples of VBA solutions, but when I try to convert them to VB.NET...RemoveItems treats the object SS as a method rather than a "target" but putting the element array in parenthesis.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; If for some reason this functionality is not available to VB.NET users...what is the solution for removing a subset of entities from a selection set? (...or simulating this action.)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Or maybe I don't have any idea what the heck I'm doing...&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Any help gratefully received.</description>
      <pubDate>Tue, 22 Apr 2008 16:18:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237625#M74836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-22T16:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveItems - Does it work in VB.NET??</title>
      <link>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237626#M74837</link>
      <description>Nevermind.  I misunderstood the question.  I am deleting from the &lt;BR /&gt;
drawing here, not removing from the selection set.&lt;BR /&gt;
&lt;BR /&gt;
Sorry.&lt;BR /&gt;
&lt;BR /&gt;
Tim J wrote:&lt;BR /&gt;
&amp;gt; This is what I have done to remove items from a selection set using the &lt;BR /&gt;
&amp;gt; ActiveX API through vb.net:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Try&lt;BR /&gt;
&amp;gt;              'build a selectionset filtering first for appname xdata&lt;BR /&gt;
&amp;gt;              GeoSS = CreateSelectionSet(AcadApp, "XdataSelectionSet")&lt;BR /&gt;
&amp;gt;              gpCode(0) = -3&lt;BR /&gt;
&amp;gt;              gpCode(1) = 1001&lt;BR /&gt;
&amp;gt;              dataValue(1) = "CTTB"&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;              GeoSS.Select(AcSelect.acSelectionSetAll, , , gpCode, dataValue)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;              For Each XdataObject In GeoSS&lt;BR /&gt;
&amp;gt;                  XdataObject.GetXData("", xtypeOut, xdataOut)&lt;BR /&gt;
&amp;gt;                  If xdataOut(1) = TopGUID Then&lt;BR /&gt;
&amp;gt;                      XdataObject.Delete()&lt;BR /&gt;
&amp;gt;                  End If&lt;BR /&gt;
&amp;gt;                  'Stop&lt;BR /&gt;
&amp;gt;              Next&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;              AcadApp.Update()&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;          Catch ex As Exception&lt;BR /&gt;
&amp;gt;              MsgBox("Failed to erase geometry.")&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;          End Try&lt;BR /&gt;
&amp;gt; PellaCAD wrote:&lt;BR /&gt;
&amp;gt;&amp;gt; Could anyone show an example of removing a subset of entities from an existing selection set via RemoveItems?&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; I am starting to think it is not possible. I find many examples of VBA solutions, but when I try to convert them to VB.NET...RemoveItems treats the object SS as a method rather than a "target" but putting the element array in parenthesis.&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; If for some reason this functionality is not available to VB.NET users...what is the solution for removing a subset of entities from a selection set? (...or simulating this action.)&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; Or maybe I don't have any idea what the heck I'm doing...&lt;BR /&gt;
&amp;gt;&amp;gt;&lt;BR /&gt;
&amp;gt;&amp;gt; Any help gratefully received.</description>
      <pubDate>Tue, 22 Apr 2008 16:27:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237626#M74837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-22T16:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: RemoveItems - Does it work in VB.NET??</title>
      <link>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237627#M74838</link>
      <description>Did you checked your post in VBA NG? Someone has pointed out the logical &lt;BR /&gt;
error in your code while you think it is language problem (with bracket or &lt;BR /&gt;
not around the parameter you paased to a method). The array you passed to &lt;BR /&gt;
RemoveItems() method is wrong, not the bracket (yes, VB.NET use () around &lt;BR /&gt;
the parameters passed, while VB/VBA does not unless you preceded with &lt;BR /&gt;
"CALL").&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"PellaCAD" wrote in message news:5911310@discussion.autodesk.com...&lt;BR /&gt;
Could anyone show an example of removing a subset of entities from an &lt;BR /&gt;
existing selection set via RemoveItems?&lt;BR /&gt;
&lt;BR /&gt;
I am starting to think it is not possible. I find many examples of VBA &lt;BR /&gt;
solutions, but when I try to convert them to VB.NET...RemoveItems treats the &lt;BR /&gt;
object SS as a method rather than a "target" but putting the element array &lt;BR /&gt;
in parenthesis.&lt;BR /&gt;
&lt;BR /&gt;
If for some reason this functionality is not available to VB.NET &lt;BR /&gt;
users...what is the solution for removing a subset of entities from a &lt;BR /&gt;
selection set? (...or simulating this action.)&lt;BR /&gt;
&lt;BR /&gt;
Or maybe I don't have any idea what the heck I'm doing...&lt;BR /&gt;
&lt;BR /&gt;
Any help gratefully received.</description>
      <pubDate>Tue, 22 Apr 2008 17:26:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/removeitems-does-it-work-in-vb-net/m-p/2237627#M74838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-22T17:26:12Z</dc:date>
    </item>
  </channel>
</rss>

