<?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 Selectionset for dynamic block in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918202#M26443</link>
    <description>I try to create a selectionset for my dynamic block "Myblock".I used group code to select all "Myblock" into selectionset.the group code is:&lt;BR /&gt;
groupcode(0)=2: blockname(0)="Myblock"&lt;BR /&gt;
selectionset acselectionsetall,,,groupcode,blockname&lt;BR /&gt;
the problem is there is nothing in the selectionset, no matter I use dynamic block's effectivename or just dynamic block's name.I can't get anything in my selectionset.Is the filter wrong or...?&lt;BR /&gt;
Thank in advance.&lt;BR /&gt;
&lt;BR /&gt;
Starline</description>
    <pubDate>Mon, 19 Mar 2007 04:57:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-03-19T04:57:01Z</dc:date>
    <item>
      <title>Selectionset for dynamic block</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918202#M26443</link>
      <description>I try to create a selectionset for my dynamic block "Myblock".I used group code to select all "Myblock" into selectionset.the group code is:&lt;BR /&gt;
groupcode(0)=2: blockname(0)="Myblock"&lt;BR /&gt;
selectionset acselectionsetall,,,groupcode,blockname&lt;BR /&gt;
the problem is there is nothing in the selectionset, no matter I use dynamic block's effectivename or just dynamic block's name.I can't get anything in my selectionset.Is the filter wrong or...?&lt;BR /&gt;
Thank in advance.&lt;BR /&gt;
&lt;BR /&gt;
Starline</description>
      <pubDate>Mon, 19 Mar 2007 04:57:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918202#M26443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-19T04:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Selectionset for dynamic block</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918203#M26444</link>
      <description>This has been discussed several times recently. A search will reveal some &lt;BR /&gt;
approaches you can take.&lt;BR /&gt;
&lt;BR /&gt;
At issue is that once you change a DBlock from its default display, it &lt;BR /&gt;
becomes an anonymous block who's EffectiveName is the original block Name.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
R. Robert Bell&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;STARLINE&gt; wrote in message news:5522582@discussion.autodesk.com...&lt;BR /&gt;
I try to create a selectionset for my dynamic block "Myblock".I used group &lt;BR /&gt;
code to select all "Myblock" into selectionset.the group code is:&lt;BR /&gt;
groupcode(0)=2: blockname(0)="Myblock"&lt;BR /&gt;
selectionset acselectionsetall,,,groupcode,blockname&lt;BR /&gt;
the problem is there is nothing in the selectionset, no matter I use dynamic &lt;BR /&gt;
block's effectivename or just dynamic block's name.I can't get anything in &lt;BR /&gt;
my selectionset.Is the filter wrong or...?&lt;BR /&gt;
Thank in advance.&lt;BR /&gt;
&lt;BR /&gt;
Starline&lt;/STARLINE&gt;</description>
      <pubDate>Mon, 19 Mar 2007 14:40:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918203#M26444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-19T14:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Selectionset for dynamic block</title>
      <link>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918204#M26445</link>
      <description>Hey Starline,&lt;BR /&gt;
                    I have recovered from the same problem which you are going through. this code will help you. Paste tis code in a new module and test it. It will hel p you. I also psted the same problem. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;BR /&gt;
Thanks&lt;BR /&gt;
Anshu&lt;BR /&gt;
****************************&lt;BR /&gt;
Private Sub funkyrefs()&lt;BR /&gt;
&lt;BR /&gt;
    Dim oBRef As IAcadBlockReference2&lt;BR /&gt;
    Dim oBlock As IAcadBlock3&lt;BR /&gt;
    Dim oBlocks As AcadBlocks&lt;BR /&gt;
    Dim strDynamicBlock As String&lt;BR /&gt;
    Dim strBRefName As String&lt;BR /&gt;
    Dim FilterType() As Integer&lt;BR /&gt;
    Dim FilterData() As Variant&lt;BR /&gt;
    Dim ss As AcadSelectionSet&lt;BR /&gt;
    Dim i As Integer&lt;BR /&gt;
    For Each ss In ThisDrawing.SelectionSets&lt;BR /&gt;
        If ss.Name = "SS" Then&lt;BR /&gt;
            ss.Delete&lt;BR /&gt;
            Exit For&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
    ReDim FilterType(0), FilterData(0)&lt;BR /&gt;
    FilterType(0) = 0: FilterData(0) = "Insert"&lt;BR /&gt;
    Set ss = ThisDrawing.SelectionSets.Add("SS")&lt;BR /&gt;
    ss.Select 5, , , FilterType:=FilterType, FilterData:=FilterData&lt;BR /&gt;
&lt;BR /&gt;
    For i = 0 To ss.Count - 1&lt;BR /&gt;
        If ss(i).IsDynamicBlock Then&lt;BR /&gt;
            Set oBRef = ss(i)&lt;BR /&gt;
            strBRefName = oBRef.Name&lt;BR /&gt;
            If Left(strBRefName, 1) = "*" Then&lt;BR /&gt;
                strBRefName = "`" + strBRefName&lt;BR /&gt;
            End If&lt;BR /&gt;
            Debug.Print oBRef.EffectiveName, oBRef.Name&lt;BR /&gt;
            If strDynamicBlock = "" Then&lt;BR /&gt;
                strDynamicBlock = strBRefName&lt;BR /&gt;
            Else&lt;BR /&gt;
                strDynamicBlock = strDynamicBlock + "," + strBRefName&lt;BR /&gt;
            End If&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
    ss.Delete&lt;BR /&gt;
    Debug.Print strDynamicBlock&lt;BR /&gt;
    ReDim FilterType(1), FilterData(1)&lt;BR /&gt;
    FilterType(0) = 0: FilterData(0) = "Insert"&lt;BR /&gt;
    FilterType(1) = 2: FilterData(1) = strDynamicBlock&lt;BR /&gt;
&lt;BR /&gt;
    Set ss = ThisDrawing.SelectionSets.Add("SS")&lt;BR /&gt;
    ss.Select 5, , , FilterType:=FilterType, FilterData:=FilterData&lt;BR /&gt;
     For i = 0 To ss.Count - 1&lt;BR /&gt;
        Set oBRef = ss(i)&lt;BR /&gt;
        Dim dynProp As AcadDynamicBlockReferenceProperty&lt;BR /&gt;
        Set dynProp = oBRef.GetDynamicBlockProperties(0)&lt;BR /&gt;
&lt;BR /&gt;
        Debug.Print oBRef.EffectiveName, oBRef.Name&lt;BR /&gt;
    Next&lt;BR /&gt;
&lt;BR /&gt;
    ss.Delete&lt;BR /&gt;
&lt;BR /&gt;
 End Sub</description>
      <pubDate>Mon, 19 Mar 2007 20:55:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/selectionset-for-dynamic-block/m-p/1918204#M26445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-19T20:55:13Z</dc:date>
    </item>
  </channel>
</rss>

