<?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: Why I don&amp;amp;#180;t get objects in the selectionset with AddItems method? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308484#M61138</link>
    <description>Hartmut,&lt;BR /&gt;
&lt;BR /&gt;
Perhaps a better way to approach a solution would be to ask "What are you attempting to accomplish?" There may actually be another to accomplish what you want if I knew exactly what you are looking for as a result.&lt;BR /&gt;
&lt;BR /&gt;
Joe&lt;BR /&gt;
--</description>
    <pubDate>Thu, 21 Aug 2003 11:38:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-08-21T11:38:29Z</dc:date>
    <item>
      <title>Why I don&amp;#180;t get objects in the selectionset with AddItems method?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308481#M61135</link>
      <description>Hallo,&lt;BR /&gt;
I have a acad 2000-drawing with some blocks. In the block are a circle&lt;BR /&gt;
and three attributes.&lt;BR /&gt;
Now I must insert the tree atrributes and the circle in a selectionset.&lt;BR /&gt;
But I don`t get the objects in the selectionset. In the array&lt;BR /&gt;
"objAttributesArray" are all objects!&lt;BR /&gt;
What is not correct with: SSetAuto.AddItems objAttributesArray ?&lt;BR /&gt;
Who can help me with a idea?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Hartmut Callies&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
sub test ()&lt;BR /&gt;
  Dim SSetUser As AcadSelectionSet&lt;BR /&gt;
  Dim SSetAuto As AcadSelectionSet&lt;BR /&gt;
  Dim objectInSSetUser As AcadEntity&lt;BR /&gt;
  Dim i As Integer&lt;BR /&gt;
  Dim objBlockRef As AcadBlockReference&lt;BR /&gt;
  Dim objBlock As AcadBlock&lt;BR /&gt;
  Dim objectInBlock As AcadEntity&lt;BR /&gt;
  Dim objAttributesArray(0 To 3) As AcadEntity&lt;BR /&gt;
&lt;BR /&gt;
'  On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
  '//first selectionset is for the user&lt;BR /&gt;
  Set SSetUser = ThisDrawing.SelectionSets("SSET1")&lt;BR /&gt;
  If Err Then&lt;BR /&gt;
    Err.Clear&lt;BR /&gt;
    Set SSetUser = ThisDrawing.SelectionSets.Add("SSET1")&lt;BR /&gt;
  End If&lt;BR /&gt;
&lt;BR /&gt;
  SSetUser.Clear&lt;BR /&gt;
&lt;BR /&gt;
  SSetUser.SelectOnScreen                     '//User&lt;BR /&gt;
&lt;BR /&gt;
  '//second selectionset for the program&lt;BR /&gt;
  Set SSetAuto = ThisDrawing.SelectionSets("SSET2")&lt;BR /&gt;
  If Err Then&lt;BR /&gt;
    Err.Clear&lt;BR /&gt;
    Set SSetAuto = ThisDrawing.SelectionSets.Add("SSET2")&lt;BR /&gt;
  End If&lt;BR /&gt;
&lt;BR /&gt;
  SSetAuto.Clear&lt;BR /&gt;
&lt;BR /&gt;
  For Each objectInSSetUser In SSetUser&lt;BR /&gt;
    Select Case objectInSSetUser.ObjectName&lt;BR /&gt;
    Case "AcDbBlockReference"                       '//&amp;lt;&amp;lt;&amp;lt;--- BLOCK&lt;BR /&gt;
      Set objBlockRef = objectInSSetUser&lt;BR /&gt;
      i = 0&lt;BR /&gt;
        Set objBlock = ThisDrawing.Blocks(objBlockRef.name)&lt;BR /&gt;
        For Each objectInBlock In objBlock&lt;BR /&gt;
          Set objAttributesArray(i) = objectInBlock&lt;BR /&gt;
          i = i + 1&lt;BR /&gt;
        Next objectInBlock&lt;BR /&gt;
    End Select&lt;BR /&gt;
  Next objectInSSetUser&lt;BR /&gt;
&lt;BR /&gt;
For i = LBound(objAttributesArray) To UBound(objAttributesArray)&lt;BR /&gt;
 Debug.Print "test1 : " &amp;amp; objAttributesArray(i).ObjectName&lt;BR /&gt;
Next i&lt;BR /&gt;
&lt;BR /&gt;
        SSetAuto.AddItems objAttributesArray                   '&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;
error&lt;BR /&gt;
&lt;BR /&gt;
For i = 0 To SSetAuto.Count&lt;BR /&gt;
 Debug.Print "test2 : " &amp;amp; SSetAuto(i).ObjectName&lt;BR /&gt;
Next i&lt;BR /&gt;
end sub</description>
      <pubDate>Thu, 21 Aug 2003 07:16:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308481#M61135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-08-21T07:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why I don&amp;#180;t get objects in the selectionset with AddItems method?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308482#M61136</link>
      <description>I'm sure we have told you before that you *cannot* place objects from a&lt;BR /&gt;
Block object into a selection set.&lt;BR /&gt;
&lt;BR /&gt;
http://tinyurl.com/kqeq&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
R. Robert Bell, MCSE&lt;BR /&gt;
www.AcadX.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Hartmut Callies" &lt;CALLIES&gt; wrote in message&lt;BR /&gt;
news:D221ABF5D6A79C690974C8D06162D4B3@in.WebX.maYIadrTaRb...&lt;BR /&gt;
| Hallo,&lt;BR /&gt;
| I have a acad 2000-drawing with some blocks. In the block are a circle&lt;BR /&gt;
| and three attributes.&lt;BR /&gt;
| Now I must insert the tree atrributes and the circle in a selectionset.&lt;BR /&gt;
| But I don`t get the objects in the selectionset. In the array&lt;BR /&gt;
| "objAttributesArray" are all objects!&lt;BR /&gt;
| What is not correct with: SSetAuto.AddItems objAttributesArray ?&lt;BR /&gt;
| Who can help me with a idea?&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;BR /&gt;
| Thanks&lt;BR /&gt;
| Hartmut Callies&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;BR /&gt;
| sub test ()&lt;BR /&gt;
|   Dim SSetUser As AcadSelectionSet&lt;BR /&gt;
|   Dim SSetAuto As AcadSelectionSet&lt;BR /&gt;
|   Dim objectInSSetUser As AcadEntity&lt;BR /&gt;
|   Dim i As Integer&lt;BR /&gt;
|   Dim objBlockRef As AcadBlockReference&lt;BR /&gt;
|   Dim objBlock As AcadBlock&lt;BR /&gt;
|   Dim objectInBlock As AcadEntity&lt;BR /&gt;
|   Dim objAttributesArray(0 To 3) As AcadEntity&lt;BR /&gt;
|&lt;BR /&gt;
| '  On Error Resume Next&lt;BR /&gt;
|&lt;BR /&gt;
|   '//first selectionset is for the user&lt;BR /&gt;
|   Set SSetUser = ThisDrawing.SelectionSets("SSET1")&lt;BR /&gt;
|   If Err Then&lt;BR /&gt;
|     Err.Clear&lt;BR /&gt;
|     Set SSetUser = ThisDrawing.SelectionSets.Add("SSET1")&lt;BR /&gt;
|   End If&lt;BR /&gt;
|&lt;BR /&gt;
|   SSetUser.Clear&lt;BR /&gt;
|&lt;BR /&gt;
|   SSetUser.SelectOnScreen                     '//User&lt;BR /&gt;
|&lt;BR /&gt;
|   '//second selectionset for the program&lt;BR /&gt;
|   Set SSetAuto = ThisDrawing.SelectionSets("SSET2")&lt;BR /&gt;
|   If Err Then&lt;BR /&gt;
|     Err.Clear&lt;BR /&gt;
|     Set SSetAuto = ThisDrawing.SelectionSets.Add("SSET2")&lt;BR /&gt;
|   End If&lt;BR /&gt;
|&lt;BR /&gt;
|   SSetAuto.Clear&lt;BR /&gt;
|&lt;BR /&gt;
|   For Each objectInSSetUser In SSetUser&lt;BR /&gt;
|     Select Case objectInSSetUser.ObjectName&lt;BR /&gt;
|     Case "AcDbBlockReference"                       '//&amp;lt;&amp;lt;&amp;lt;--- BLOCK&lt;BR /&gt;
|       Set objBlockRef = objectInSSetUser&lt;BR /&gt;
|       i = 0&lt;BR /&gt;
|         Set objBlock = ThisDrawing.Blocks(objBlockRef.name)&lt;BR /&gt;
|         For Each objectInBlock In objBlock&lt;BR /&gt;
|           Set objAttributesArray(i) = objectInBlock&lt;BR /&gt;
|           i = i + 1&lt;BR /&gt;
|         Next objectInBlock&lt;BR /&gt;
|     End Select&lt;BR /&gt;
|   Next objectInSSetUser&lt;BR /&gt;
|&lt;BR /&gt;
| For i = LBound(objAttributesArray) To UBound(objAttributesArray)&lt;BR /&gt;
|  Debug.Print "test1 : " &amp;amp; objAttributesArray(i).ObjectName&lt;BR /&gt;
| Next i&lt;BR /&gt;
|&lt;BR /&gt;
|         SSetAuto.AddItems objAttributesArray&lt;BR /&gt;
'&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;BR /&gt;
| error&lt;BR /&gt;
|&lt;BR /&gt;
| For i = 0 To SSetAuto.Count&lt;BR /&gt;
|  Debug.Print "test2 : " &amp;amp; SSetAuto(i).ObjectName&lt;BR /&gt;
| Next i&lt;BR /&gt;
| end sub&lt;BR /&gt;
|&lt;BR /&gt;
|&lt;/CALLIES&gt;</description>
      <pubDate>Thu, 21 Aug 2003 07:28:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308482#M61136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-08-21T07:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why I don&amp;#180;t get objects in the selectionset with AddItems method?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308483#M61137</link>
      <description>looks like you're trying to take definitions of objects out of the block&lt;BR /&gt;
table (definition of the block) and put them in a selection set.&lt;BR /&gt;
if I'm not mistaken:&lt;BR /&gt;
a selection set is a container for objects/entities in a drawing&lt;BR /&gt;
the definitions in a block definition (the parts of the block, attributes,&lt;BR /&gt;
circle etc)&lt;BR /&gt;
are pointers to a definition of an object that will be referred to when a&lt;BR /&gt;
block reference is inserted in the drawing, they are not really entities in&lt;BR /&gt;
the drawing(unless you insert a block and then explode it)&lt;BR /&gt;
you could put your block reference in the selection set, or you could&lt;BR /&gt;
explode the block and put the resultant objects in the selectionset...&lt;BR /&gt;
what did you want to do with the items you want to put in the selection set?&lt;BR /&gt;
you already have a reference to them when you get the block reference&lt;BR /&gt;
itself, maybe you can do what you want without a selection set?????&lt;BR /&gt;
maybe some more info on what you're trying to do will help&lt;BR /&gt;
hth&lt;BR /&gt;
Mark&lt;BR /&gt;
&lt;BR /&gt;
"Hartmut Callies" &lt;CALLIES&gt; wrote in message&lt;BR /&gt;
news:D221ABF5D6A79C690974C8D06162D4B3@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hallo,&lt;BR /&gt;
&amp;gt; I have a acad 2000-drawing with some blocks. In the block are a circle&lt;BR /&gt;
&amp;gt; and three attributes.&lt;/CALLIES&gt;</description>
      <pubDate>Thu, 21 Aug 2003 07:33:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308483#M61137</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-08-21T07:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why I don&amp;#180;t get objects in the selectionset with AddItems method?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308484#M61138</link>
      <description>Hartmut,&lt;BR /&gt;
&lt;BR /&gt;
Perhaps a better way to approach a solution would be to ask "What are you attempting to accomplish?" There may actually be another to accomplish what you want if I knew exactly what you are looking for as a result.&lt;BR /&gt;
&lt;BR /&gt;
Joe&lt;BR /&gt;
--</description>
      <pubDate>Thu, 21 Aug 2003 11:38:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/why-i-don-amp-180-t-get-objects-in-the-selectionset-with/m-p/308484#M61138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-08-21T11:38:29Z</dc:date>
    </item>
  </channel>
</rss>

