<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>CAD Forum discussion (EN) : SelectionSets Question</title>
  <link>https://www.cadforum.cz/forum_en/</link>
  <description><![CDATA[This is an XML content feed of; CAD Forum discussion (EN) : AutoCAD : SelectionSets Question]]></description>
  <pubDate>Wed, 22 Apr 2026 09:04:02 +0000</pubDate>
  <lastBuildDate>Thu, 16 Sep 2010 13:42:03 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://www.cadforum.cz/forum_en/RSS_post_feed.asp?TID=4356</WebWizForums:feedURL>
  <image>
   <title><![CDATA[CAD Forum discussion (EN)]]></title>
   <url>https://www.cadforum.cz/forum_en/forum_images/web_wiz_forums.png</url>
   <link>https://www.cadforum.cz/forum_en/</link>
  </image>
  <item>
   <title><![CDATA[SelectionSets Question : Hi guys,I am Albert and I just...]]></title>
   <link>https://www.cadforum.cz/forum_en/forum_posts.asp?TID=4356&amp;PID=11044&amp;title=selectionsets-question#11044</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="https://www.cadforum.cz/forum_en/member_profile.asp?PF=134454">Silentwolf</a><br /><strong>Subject:</strong> 4356<br /><strong>Posted:</strong> 16.Sep.2010 at 13:42<br /><br />Hi guys,<br>I am Albert and I just became a member of this forum and I am completly new to AutoCad VBA so please be gentle with me :)<br><br>As I like to get into Programming a little I looked on the net for some examples and found a small program to select layers in my drawing and then be able to change the drawing with an selected layer of a listbox.<br><br>The code below shows what I got but when I make a selection in my list box&nbsp; <i>get an error ("The selection set exists")<br><br></i>Here is the code.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub CommandButton1_Click()<br><br>Dim Entity As Object<br>Dim ss As AcadSelectionSets<br>'declare variable as local<br>&nbsp;<br>Me.Hide<br>'hide the dialogue box<br>&nbsp;<br>Set ss = ThisDrawing.SelectionSets.Add("NEWSS")<br>'create a selection set reference<br>&nbsp;<br>ss.SelectOnScreen<br>'select the objects to change<br>&nbsp;<br>For Each Entity In ss<br>'for every entity in the selection set<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; Entity.Layer = ListBox1.Text<br>&nbsp;&nbsp;&nbsp; 'change the layer to the layer name<br>&nbsp;&nbsp;&nbsp; 'selected in the list box<br>&nbsp;&nbsp;&nbsp; <br>Next<br>'process the next entity<br>&nbsp;<br>End<br>'end the programme<br><br>'declare variable as local<br>&nbsp;<br>Me.Hide<br>'hide the dialogue box<br>&nbsp;<br>Set ss = ThisDrawing.SelectionSets.Add("NEWSS")<br>'create a selection set reference<br>&nbsp;<br>ss.SelectOnScreen<br>'select the objects to change<br>&nbsp;<br>For Each Entity In ss<br>'for every entity in the selection set<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; Entity.Layer = ListBox1.Text<br>&nbsp;&nbsp;&nbsp; 'change the layer to the layer name<br>&nbsp;&nbsp;&nbsp; 'selected in the list box<br>&nbsp;&nbsp;&nbsp; <br>Next<br>'process the next entity<br>&nbsp;<br>End<br>'end the programme<br><br>End Sub<br></pre></td></tr></table><br>Could someone please let me know why it does not work or what I am missing?? I use AutoCad 2002.<br><br>It would be nice to get an answer from you guys and it would be very much appreciated!<br><br>Thanks<br><br>Albert<br><br>]]>
   </description>
   <pubDate>Thu, 16 Sep 2010 13:42:03 +0000</pubDate>
   <guid isPermaLink="true">https://www.cadforum.cz/forum_en/forum_posts.asp?TID=4356&amp;PID=11044&amp;title=selectionsets-question#11044</guid>
  </item> 
 </channel>
</rss>