<?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: Get Attribute value in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837320#M2763</link>
    <description>&lt;P&gt;Because system drawings in my company it not change, I can't anyway. I only want get value and input to Inventor.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 06:14:11 GMT</pubDate>
    <dc:creator>tonythm</dc:creator>
    <dc:date>2021-12-22T06:14:11Z</dc:date>
    <item>
      <title>Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835207#M2752</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have many Block (same name block, but different value).&lt;/P&gt;&lt;P&gt;How to get value in each block using VBA?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 06:33:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835207#M2752</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-21T06:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835257#M2753</link>
      <description>&lt;P&gt;Could you try to have an approach like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub BL_Attr()
Dim ReturnObj As AcadObject
Dim MyObj As AcadBlockReference
Dim MyAtt As Variant
For Each ReturnObj In ThisDrawing.ModelSpace
    If TypeOf ReturnObj Is AcadBlockReference Then
       'If ReturnObj.Name = "MYBLOCKNAME" Then
            If ReturnObj.HasAttributes = True Then
                Set MyObj = ReturnObj
                MyAtt = MyObj.GetAttributes
                For X = LBound(MyAtt) To UBound(MyAtt)
                    Debug.Print MyAtt(X).TextString, MyAtt(X).TagString                 
                Next X
            End If
       ' End If
    End If
Next
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The list of all attributes will be stored into the array MyAtt, and the sequence of block attribute will be the same as showed into the window which appear if you double click on block for attribute manually modification.&lt;/P&gt;&lt;P&gt;The value of attribute will be stored into .TextString properties and the "TAG" of the attribute will be stored into .TagString attributes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to be sure of selected specific block name you can remove the comment from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;'If ReturnObj.Name = "MYBLOCKNAME" Then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;replacing MYBLOCKNAME text with your block name and related below comment&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;'end if&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Let us know the result&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 07:19:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835257#M2753</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-21T07:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835335#M2754</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value of each attribute then I got, but problem here, Ex:&lt;/P&gt;&lt;P&gt;I have 3 Blocks (same block name)each block is reversion drawing, inside block have 3 attribute (same name, but diff value). I export value to excel file, but since they have the same name, the values of rev C are overwrite to value rev B on excel.&lt;/P&gt;&lt;P&gt;"TITLE-1",&amp;nbsp;"TITLE-2",&amp;nbsp;"TITLE-3" in each block.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;For Each ent In oDoc.ModelSpace
        If TypeOf ent Is AcadBlockReference Then
            Set blk = ent
            If UCase(blk.EffectiveName) = "REV" Then
                    atts = blk.GetAttributes()
                    For i = 0 To UBound(atts)
                    Set att = atts(i)
                            If att.TextString = "B" Then
                                Range("B23") = att.TextString
                            ElseIf att.TagString = "TITLE-1" Then
                                Range("B21") = att.TextString
                            ElseIf att.TagString = "TITLE-2" Then
                                Range("B19") = att.TextString
                            ElseIf att.TagString = "TITLE-3" Then
                                Range("B20") = att.TextString
                        End If
                    Next
            End If
        End If
    Next&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 08:08:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835335#M2754</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-21T08:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835603#M2755</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it's not so good have a block with same attribute name, I'm suggesting to modify the title block with different attribute name.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 11:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10835603#M2755</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-21T11:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10836087#M2756</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8622703"&gt;@tonythm&lt;/a&gt; When you copy an attribute definition and don't change it's tag name, you run into this kind of problem. There is no way to programmatically differentiate between them. In the below image, I entered the attribute values in what I thought was the correct order, but you can see that AutoCAD has the values from bottom to top. In the EATTEDIT dialog, the duplicate atts are highlighted in red to let you know a problem exists. Now, if you redefine the block to have unique tag names, you still have the problem that each AcadBlockReference has it's original attribute collection. You will have to use the ATTSYNC command after redefining. After that, the code should work. If this is not the case, then we don't understand your problem. Submit a sample drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Poorly named attributes.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003732iBDFD939CE9A96092/image-size/large?v=v2&amp;amp;px=999" role="button" title="Poorly named attributes.png" alt="Poorly named attributes.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 15:26:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10836087#M2756</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-12-21T15:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837037#M2757</link>
      <description>&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Due to security reasons, I can't send drawing. Maybe it's my lack of presentation.&lt;/P&gt;&lt;P&gt;In Block, tag name different, prompt different, value different also. In drawing, have many block with same block name.&lt;/P&gt;&lt;P&gt;I don't know with VBA how to get value on block. Please help me.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 01:14:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837037#M2757</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-22T01:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837063#M2758</link>
      <description>&lt;P&gt;Can you export a block only? Use wblock it create a dwg only with block. In this way we can understand, because you are saying a different thing compared with starting msg. Use the code above, and share the content.&lt;/P&gt;&lt;P&gt;Bye&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 01:39:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837063#M2758</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-22T01:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837176#M2759</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp; the attached image will be more clear for my example.&lt;/P&gt;&lt;P&gt;I have many similar blocks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if there's some thing wrong with my code.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub GetProperties()
    Dim oWkbk As Workbook
    Set oWkbk = ThisWorkbook
    Dim oSheet As Worksheet
    Set oSheet = oWkbk.ActiveSheet
    'Define sheet name where information resides
    Dim sSheetName As String
    sSheetName = "iProperties"
    Dim oAcad As AcadApplication
    Set oAcad = GetObject(, "AutoCAD.Application")
    Dim oDoc As AcadDocument
    Set oDoc = oAcad.ActiveDocument
    
    Dim ent As AcadEntity
    Dim blk As AcadBlockReference
    Dim blkNameA4Format As String
        blkNameA4Format = "A4&amp;#144;"
    Dim blkNameA4Titleblock As String
        blkNameA4Titleblock = "TTL-New-S"
    Dim blkNameA4Titleblock2 As String
        blkNameA4Titleblock2 = "REVSIGN-S"
    Dim blkNameA3Format As String
        blkNameA3Format = "A3"
    Dim blkNameA2Format As String
        blkNameA2Format = "A2"
    Dim blkNameA1Format As String
        blkNameA1Format = "A1"
    Dim blkNameTitleblock As String
        blkNameTitleblock = "TTL-New"
    Dim blkNameTitleblock2 As String
        blkNameTitleblock2 = "REVSIGN-S"
    Dim blkNameTitleblock3 As String
        blkNameTitleblock3 = "REVSIGN"
    For Each ent In oDoc.ModelSpace
        If TypeOf ent Is AcadBlockReference Then
            Set blk = ent
            If UCase(blk.EffectiveName) = UCase(blkNameTitleblock3) Then
                
                    atts = blk.GetAttributes()
                    For i = 0 To UBound(atts)
                    Set att = atts(i)
                        If att.TagString = "TITLE-1" Then                    
                            Range("B18") = att.TextString
                        ElseIf att.TagString = "TITLE-2" Then
                            Range("B19") = att.TextString
                        ElseIf att.TagString = "TITLE-3" Then
                            Range("B20") = att.TextString
                        ElseIf att.TagString = "TITLE-4" Then
                            Range("B21") = att.TextString
                        ElseIf att.TagString = "DATE" Then
                            Range("B22") = att.TextString
                        End If
                    Next
              
            End If
        End If
    Next
    MsgBox "Done!"
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Attribute.JPG" style="width: 578px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003921i1011D7557CE3900B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attribute.JPG" alt="Attribute.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Attribute-2.JPG" style="width: 291px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003922iB54AC4FAD00416BE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attribute-2.JPG" alt="Attribute-2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Attribute-3.JPG" style="width: 576px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003923i1E438CBFE7283F12/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attribute-3.JPG" alt="Attribute-3.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_1-1640142160417.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003924i03F566207D81511F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_1-1640142160417.png" alt="levanthongeng_1-1640142160417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_2-1640143241581.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003928i27AE7A4DCE1CC02C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_2-1640143241581.png" alt="levanthongeng_2-1640143241581.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 03:21:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837176#M2759</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-22T03:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837214#M2760</link>
      <description>&lt;P&gt;At each iteration, you write to the same range, B18..B22. You need to increment the row numbers rather than hard coding the values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 04:05:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837214#M2760</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-12-22T04:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837259#M2761</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;I increased the number of rows (B26...B30....), but because of the same tag name the value received is only ONE.&lt;/P&gt;&lt;P&gt;How to get the value of each block in each separate range in excel?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub GetProperties2()
    Dim oWkbk As Workbook
    Set oWkbk = ThisWorkbook
    Dim oSheet As Worksheet
    Set oSheet = oWkbk.ActiveSheet
    'Define sheet name where information resides
    Dim sSheetName As String
    sSheetName = "iProperties"
    Dim oAcad As AcadApplication
    Set oAcad = GetObject(, "AutoCAD.Application")
    Dim oDoc As AcadDocument
    Set oDoc = oAcad.ActiveDocument
    
    Dim ent As AcadEntity
    Dim blk As AcadBlockReference
    Dim blkNameA4Format As String
        blkNameA4Format = "A4&amp;#144;""
    Dim blkNameA4Titleblock As String
        blkNameA4Titleblock = "TTL-New-S"
    Dim blkNameA4Titleblock2 As String
        blkNameA4Titleblock2 = "REVSIGN-S"
    Dim blkNameA3Format As String
        blkNameA3Format = "A3"
    Dim blkNameA2Format As String
        blkNameA2Format = "A2"
    Dim blkNameA1Format As String
        blkNameA1Format = "A1"
    Dim blkNameTitleblock As String
        blkNameTitleblock = "TTL-New"
    Dim blkNameTitleblock2 As String
        blkNameTitleblock2 = "REVSIGN-S"
    Dim blkNameTitleblock3 As String
        blkNameTitleblock3 = "REVSIGN"
    For Each ent In oDoc.ModelSpace
        If TypeOf ent Is AcadBlockReference Then
            Set blk = ent
            If UCase(blk.EffectiveName) = UCase(blkNameTitleblock3) Then
                
                    atts = blk.GetAttributes()
                    For i = 0 To UBound(atts)
                    Set att = atts(i)
                        If att.TagString = "TITLE-1" Then
                            Range("B18") = att.TextString
                        ElseIf att.TagString = "TITLE-2" Then
                            Range("B19") = att.TextString
                        ElseIf att.TagString = "TITLE-3" Then
                            Range("B20") = att.TextString
                        ElseIf att.TagString = "TITLE-4" Then
                            Range("B21") = att.TextString
                        ElseIf att.TagString = "DATE" Then
                            Range("B22") = att.TextString
                        End If
                        If att.TagString = "TITLE-1" Then
                            Range("B26") = att.TextString
                        ElseIf att.TagString = "TITLE-2" Then
                            Range("B27") = att.TextString
                        ElseIf att.TagString = "TITLE-3" Then
                            Range("B28") = att.TextString
                        ElseIf att.TagString = "TITLE-4" Then
                            Range("B29") = att.TextString
                        ElseIf att.TagString = "DATE" Then
                            Range("B30") = att.TextString
                        End If
                        If att.TagString = "TITLE-1" Then
                            Range("B34") = att.TextString
                        ElseIf att.TagString = "TITLE-2" Then
                            Range("B35") = att.TextString
                        ElseIf att.TagString = "TITLE-3" Then
                            Range("B36") = att.TextString
                        ElseIf att.TagString = "TITLE-4" Then
                            Range("B37") = att.TextString
                        ElseIf att.TagString = "DATE" Then
                            Range("B38") = att.TextString
                        End If
                    Next
              
            End If
        End If
    Next
    MsgBox "Done!"
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_0-1640148863899.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1003936i5DD553603FF8111A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_0-1640148863899.png" alt="levanthongeng_0-1640148863899.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 05:06:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837259#M2761</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-22T05:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837303#M2762</link>
      <description>&lt;P&gt;Sorry but I don't understand why you cannot replace date with date-1 date-2 date-3 you have only redefine block and all the same block will be updated, unfortunately you will loose attribute value&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 06:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837303#M2762</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-22T06:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837320#M2763</link>
      <description>&lt;P&gt;Because system drawings in my company it not change, I can't anyway. I only want get value and input to Inventor.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 06:14:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10837320#M2763</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-22T06:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10838135#M2764</link>
      <description>&lt;P&gt;You're still hard coding the row numbers and writing to the same range each loop, just doing it 3 times. Here's a simplified example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Dim row as int
row = 1
for each blockref
   'get atts
   for each att
      row = row +1 'here is the important part
      If att.TagString = "TITLE-1" Then
        Range("B" &amp;amp; row) = att.TextString
      If att.TagString = "TITLE-2" Then
        Range("B" &amp;amp; (row +1)) = att.TextString
      If att.TagString = "TITLE-3" Then
        Range("B" &amp;amp; (row +2)) = att.TextString
      If att.TagString = "DATE" Then
        Range("B" &amp;amp; (row +3)) = att.TextString&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 15:13:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10838135#M2764</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-12-22T15:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10839245#M2765</link>
      <description>&lt;P&gt;why dont use attribute export command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why dont enter each attribute values in columns,&amp;nbsp; and one column with handle to identify the block&lt;/P&gt;&lt;P&gt;and tagstrings as headers,&amp;nbsp; similar output as in attrubute export command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 05:25:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10839245#M2765</guid>
      <dc:creator>MakCADD</dc:creator>
      <dc:date>2021-12-23T05:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10844680#M2766</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/14801"&gt;@Ed__Jobe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 blocks as shown below. How to get the information atts of those 3 blocks into excel of areas B, C, D.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Attribute-2.JPG" style="width: 291px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005154i23C082D683004EAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Attribute-2.JPG" alt="Attribute-2.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_2-1640143241581.png" style="width: 187px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005156i8356DAB54F404794/image-size/large?v=v2&amp;amp;px=999" role="button" title="levanthongeng_2-1640143241581.png" alt="levanthongeng_2-1640143241581.png" /&gt;&lt;/span&gt;&lt;BR /&gt;All 3 blocks have the same name: REVSIGN. Tag name atts is different.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_0-1640611559186.jpeg" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005158iCB2C2A17BAB34D6D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_0-1640611559186.jpeg" alt="levanthongeng_0-1640611559186.jpeg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_1-1640611575305.jpeg" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005159iC9C89F4C096DCF25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_1-1640611575305.jpeg" alt="levanthongeng_1-1640611575305.jpeg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_2-1640611588448.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005160i5AB931CAD16D83DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_2-1640611588448.png" alt="levanthongeng_2-1640611588448.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When I run the code, it only takes the last value (NAME 9,...12 &amp;amp; DATE value) and fills all 3 areas B, C, D in excel.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="levanthongeng_3-1640611642085.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005161i5AC56104533D8DB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="levanthongeng_3-1640611642085.png" alt="levanthongeng_3-1640611642085.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How to fill values NAME 1,..4 &amp;amp; DATE into area B, NAME 5,..8&amp;nbsp;&amp;amp; DATE into area C, and NAME 9,...12 &amp;amp; DATE into area D.&lt;/P&gt;&lt;P&gt;I have attached CAD and excel files.&lt;BR /&gt;I just learned about VBA so I really haven't used it very well yet. Can you help me?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 13:37:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10844680#M2766</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-27T13:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10845078#M2767</link>
      <description>&lt;P&gt;I'm on vacation this week. I don't know if I'll have time until next week.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 17:23:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10845078#M2767</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2021-12-27T17:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10845326#M2768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8622703"&gt;@tonythm&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Try to apply this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A = 1 ' to be added before For Each ent...&lt;BR /&gt;For Each ent In oDoc.ModelSpace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If UCase(blk.EffectiveName) = UCase(blkNameTitleblock3) Then&lt;BR /&gt;'simple test&lt;BR /&gt;atts = blk.GetAttributes()&lt;BR /&gt;For i = 0 To UBound(atts)&lt;BR /&gt;Range("F" &amp;amp; A) = atts(i).TagString&lt;BR /&gt;Range("G" &amp;amp; A) = atts(i).TextString&lt;BR /&gt;A = A + 1&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here the result&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grobnik_0-1640634317091.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1005290i0F5A2EED80EB99B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="grobnik_0-1640634317091.png" alt="grobnik_0-1640634317091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The above result it's exactly the sequence of attributes inserted for each block in the drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 19:56:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10845326#M2768</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-27T19:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10846622#M2769</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/472256"&gt;@grobnik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Awesome, helped me quickly at work. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 14:30:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10846622#M2769</guid>
      <dc:creator>tonythm</dc:creator>
      <dc:date>2021-12-28T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attribute value</title>
      <link>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10846732#M2770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8622703"&gt;@tonythm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;if you want you keep the code as is, later hide the columns F &amp;amp; G and apply the same value in your Excel Form using formula see attached revised xls file.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 15:32:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/get-attribute-value/m-p/10846732#M2770</guid>
      <dc:creator>grobnik</dc:creator>
      <dc:date>2021-12-28T15:32:31Z</dc:date>
    </item>
  </channel>
</rss>

