<?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 Can I Select All Block Attributes Using VBA Coding in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630458#M11506</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you looked to the VBA-help for selectionset? The help shows how to select Circles, change it to select "INSERT"-objects ("INSERT"=DXF-Code for BlockReferences)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is from the help:&lt;/P&gt;&lt;PRE&gt;Sub Example_Select()
    ' This example adds members to a selection set, first by crossing and
    ' then by filtering for circles.
    
    ' Create the selection set
    Dim ssetObj As AcadSelectionSet
    Set ssetObj = ThisDrawing.SelectionSets.Add("SSET")
    
    
    ' Add all object to the selection set that lie within a crossing of (28,17,0) and
    ' (-3.3, -3.6,0) 
    Dim mode As Integer
    Dim corner1(0 To 2) As Double
    Dim corner2(0 To 2) As Double
    
    mode = acSelectionSetCrossing
    corner1(0) = 28: corner1(1) = 17: corner1(2) = 0
    corner2(0) = -3.3: corner2(1) = -3.6: corner2(2) = 0
    ssetObj.Select mode, corner1, corner2
    
    ' Add all the Circles to the selection set that lie within the crossing of (28,17,0) and
    ' (-3.3, -3.6,0) by filtering from the current drawing
    Dim gpCode(0) As Integer
    Dim dataValue(0) As Variant
    gpCode(0) = 0
    dataValue(0) = "Circle"
    
    Dim groupCode As Variant, dataCode As Variant
    groupCode = gpCode
    dataCode = dataValue
    
    ssetObj.Select mode, corner1, corner2, groupCode, dataCode
    
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
    <pubDate>Sun, 23 Sep 2012 12:38:56 GMT</pubDate>
    <dc:creator>Alfred.NESWADBA</dc:creator>
    <dc:date>2012-09-23T12:38:56Z</dc:date>
    <item>
      <title>How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630434#M11501</link>
      <description>&lt;P&gt;How Can I Select All Blocks Attributes Using VBA Coding&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;all blocks with any name with any layer with any property&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx 4 all&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 11:00:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630434#M11501</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2012-09-23T11:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630442#M11502</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;look to getAttributes-function of the BlockReference in the help, there you see how to access attributes.&lt;/P&gt;&lt;P&gt;This sample is in the help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Example_GetAttributes()
    ' This example creates a block. It then adds attributes to that
    ' block. The block is then inserted into the drawing to create
    ' a block reference.
    
    ' Create the block
    Dim blockObj As AcadBlock
    Dim insertionPnt(0 To 2) As Double
    insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#
    Set blockObj = ThisDrawing.Blocks.Add(insertionPnt, "TESTBLOCK")
    
    ' Define the attribute definition
    Dim attributeObj As AcadAttribute
    Dim height As Double
    Dim mode As Long
    Dim prompt As String
    Dim insertionPoint(0 To 2) As Double
    Dim tag As String
    Dim value As String
    height = 1#
    mode = acAttributeModeVerify
    prompt = "Attribute Prompt"
    insertionPoint(0) = 5#: insertionPoint(1) = 5#: insertionPoint(2) = 0
    tag = "Attribute Tag"
    value = "Attribute Value"
    
    ' Create the attribute definition object in model space
    Set attributeObj = blockObj.AddAttribute(height, mode, prompt, insertionPoint, tag, value)
    
   
    ' Insert the block
    Dim blockRefObj As AcadBlockReference
    insertionPnt(0) = 2#: insertionPnt(1) = 2#: insertionPnt(2) = 0
    Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "TESTBLOCK", 1#, 1#, 1#, 0)
    ZoomAll
    
    ' Get the attributes for the block reference
    Dim varAttributes As Variant
    varAttributes = blockRefObj.GetAttributes
    
    ' Move the attribute tags and values into a string to be displayed in a Msgbox
    Dim strAttributes As String
    Dim I As Integer
    For I = LBound(varAttributes) To UBound(varAttributes)
        strAttributes = strAttributes &amp;amp; "  Tag: " &amp;amp; varAttributes(I).TagString &amp;amp; _
                        "   Value: " &amp;amp; varAttributes(I).textString &amp;amp; "    "
    Next
    MsgBox "The attributes for blockReference " &amp;amp; blockRefObj.name &amp;amp; " are: " &amp;amp; strAttributes, , "GetAttributes Example"
    
    ' Change the value of the attribute
    ' Note: There is no SetAttributes. Once you have the variant array, you have the objects.
    ' Changing them changes the objects in the drawing.
    varAttributes(0).textString = "NEW VALUE!"
    
    ' Get the attributes
    Dim newvarAttributes As Variant
    newvarAttributes = blockRefObj.GetAttributes
    
    ' Again, display the tags and values
    strAttributes = ""
    For I = LBound(varAttributes) To UBound(varAttributes)
        strAttributes = strAttributes &amp;amp; "  Tag: " &amp;amp; varAttributes(I).TagString &amp;amp; _
                        "   Value: " &amp;amp; varAttributes(I).textString &amp;amp; "    "
    Next
    MsgBox "The attributes for blockReference " &amp;amp; blockRefObj.name &amp;amp; " are: " &amp;amp; strAttributes, , "GetAttributes Example"
    
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 11:26:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630442#M11502</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-09-23T11:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630444#M11503</link>
      <description>&lt;P&gt;thank you Mr. &lt;SPAN&gt;&lt;SPAN&gt;alfred.neswadba&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;but you understand me i need just use the selection method to select all block in drawing but i don't know how can i change the vlaue of &lt;SPAN&gt;&lt;SPAN&gt;FilterType and FilterData&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;SPAN&gt;&lt;SPAN&gt;this function "Sel.SelectOnScreen FilterType, FilterData"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 11:49:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630444#M11503</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2012-09-23T11:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630448#M11504</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can't select AttributeReferences directly with any Select-function as AttributeReferences are always subobjects of BlockReferences.&lt;/P&gt;&lt;P&gt;So you have to select all BlockReferences, then scan through them and use GetAttributes to get access to the AttrbuteReferences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 12:16:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630448#M11504</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-09-23T12:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630454#M11505</link>
      <description>&lt;P&gt;yes it's ok&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and that's i need ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you help me how can control with filteration variables to can select all blocks in dwg? using selection method&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;understand me??&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 12:21:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630454#M11505</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2012-09-23T12:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630458#M11506</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have you looked to the VBA-help for selectionset? The help shows how to select Circles, change it to select "INSERT"-objects ("INSERT"=DXF-Code for BlockReferences)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is from the help:&lt;/P&gt;&lt;PRE&gt;Sub Example_Select()
    ' This example adds members to a selection set, first by crossing and
    ' then by filtering for circles.
    
    ' Create the selection set
    Dim ssetObj As AcadSelectionSet
    Set ssetObj = ThisDrawing.SelectionSets.Add("SSET")
    
    
    ' Add all object to the selection set that lie within a crossing of (28,17,0) and
    ' (-3.3, -3.6,0) 
    Dim mode As Integer
    Dim corner1(0 To 2) As Double
    Dim corner2(0 To 2) As Double
    
    mode = acSelectionSetCrossing
    corner1(0) = 28: corner1(1) = 17: corner1(2) = 0
    corner2(0) = -3.3: corner2(1) = -3.6: corner2(2) = 0
    ssetObj.Select mode, corner1, corner2
    
    ' Add all the Circles to the selection set that lie within the crossing of (28,17,0) and
    ' (-3.3, -3.6,0) by filtering from the current drawing
    Dim gpCode(0) As Integer
    Dim dataValue(0) As Variant
    gpCode(0) = 0
    dataValue(0) = "Circle"
    
    Dim groupCode As Variant, dataCode As Variant
    groupCode = gpCode
    dataCode = dataValue
    
    ssetObj.Select mode, corner1, corner2, groupCode, dataCode
    
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 12:38:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630458#M11506</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-09-23T12:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630468#M11507</link>
      <description>&lt;PRE&gt;dataValue(0) = "Circle"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so what is the word can i replace the circle to can select block ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i&amp;nbsp; tried AcadBlockReference but it's not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 12:49:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630468#M11507</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2012-09-23T12:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630474#M11508</link>
      <description>&lt;P&gt;FilterType(0) =0&lt;/P&gt;&lt;P&gt;FilterData(0) = "INSERT"&lt;/P&gt;&lt;P&gt;Sel.SelectOnScreen FilterType, FilterData&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the correct solution that i need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i don't know what 's mean insert word?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks mr for your help&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2012 13:09:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/3630474#M11508</guid>
      <dc:creator>Amremad</dc:creator>
      <dc:date>2012-09-23T13:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Select All Block Attributes Using VBA Coding</title>
      <link>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/4956260#M11509</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I need little help. I want to know how to select all attributes like TAG and VALUE from CAD document.&lt;/P&gt;&lt;P&gt;If I use&lt;/P&gt;&lt;P&gt;Dim elem As Object&lt;/P&gt;&lt;P&gt;For Each elem In ThisDrawing.ActiveSelectionSet, this retun me just one of set TAGs and VALUE, but in document I have this more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my english. An thank you for help.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2014 08:41:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/how-can-i-select-all-block-attributes-using-vba-coding/m-p/4956260#M11509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-14T08:41:09Z</dc:date>
    </item>
  </channel>
</rss>

