<?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: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309148#M60730</link>
    <description>Yes my attribute is in the block called "BlockbusterBorder"  Your code addition works out well.  My next step is to put the text in Textbox1 which is easy. After that I am compiling a master list I might need help on but I want to try first on my own.  Thanks for the info.</description>
    <pubDate>Fri, 12 Sep 2003 05:29:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-09-12T05:29:33Z</dc:date>
    <item>
      <title>I need to extract a single attribute.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309146#M60728</link>
      <description>I am fairly new in the VBA programming.  I am trying to extract a single attribute and the program I have extracts all the attributes in my drawing.  Here is the code can someone point me in the right direction.&lt;BR /&gt;
&lt;BR /&gt;
Private Sub CommandButton1_Click()&lt;BR /&gt;
    Dim ACADObject As AcadEntity&lt;BR /&gt;
    Dim element As Object&lt;BR /&gt;
    Dim ArrayAttributes As Variant&lt;BR /&gt;
    Dim TagString As String&lt;BR /&gt;
    TagString = "BR_ST#"&lt;BR /&gt;
    Dim I As Integer&lt;BR /&gt;
    For Each element In ThisDrawing.ModelSpace&lt;BR /&gt;
    If element.EntityType = 7 Then&lt;BR /&gt;
    ArrayAttributes = element.GetAttributes&lt;BR /&gt;
    For I = LBound(ArrayAttributes) To UBound(ArrayAttributes)&lt;BR /&gt;
    MsgBox "Attribute Text String : " &amp;amp; ArrayAttributes(I).TextString&lt;BR /&gt;
    UserForm1.Hide&lt;BR /&gt;
    Next&lt;BR /&gt;
End If&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The attributetag "BR_ST" is the attribute I want to isolate, it is the first one that lists in the message box's.  You can email me direct at norm.akin@blockbuster.com&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Thu, 11 Sep 2003 12:54:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309146#M60728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-11T12:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: I need to extract a single attribute.</title>
      <link>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309147#M60729</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;is the attribute in a certain block reference? what &lt;BR /&gt;
is the block name?&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;that will narrow down the search &lt;BR /&gt;
programatically&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;do a filtered selection for the block instead of &lt;BR /&gt;
iterating everything in model space&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;but in your code as is, you could do something &lt;BR /&gt;
like&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If element.HasAttributes &lt;BR /&gt;
then&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayAttributes = &lt;BR /&gt;
element.GetAttributes &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For I = &lt;BR /&gt;
LBound(ArrayAttributes) To UBound(ArrayAttributes) &lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If ArrayAttributes(I).TagString = "tag you want" &lt;BR /&gt;
then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MsgBox "Attribute Text String : " &amp;amp; &lt;BR /&gt;
ArrayAttributes(I).TextString &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserForm1.Hide &lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
&lt;/FONT&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next &lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End if&lt;/FONT&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE dir="ltr"&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"normanakin" &amp;lt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:norm.akin@blockbuster.com"&amp;gt;norm.akin@blockbuster.com&lt;/A&gt;&amp;gt; &lt;BR /&gt;
  wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f189858.-1@WebX.maYIadrTaRb"&amp;gt;news:f189858.-1@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;I &lt;BR /&gt;
  am fairly new in the VBA programming. I am trying to extract a single &lt;BR /&gt;
  attribute and the program I have extracts all the attributes in my drawing. &lt;BR /&gt;
  Here is the code can someone point me in the right direction. &lt;BR /&gt;
  &lt;P&gt;Private Sub CommandButton1_Click() &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim &lt;BR /&gt;
  ACADObject As AcadEntity &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim element As Object &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim ArrayAttributes As Variant &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim TagString As String &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TagString = "BR_ST#" &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim I As Integer &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For &lt;BR /&gt;
  Each element In ThisDrawing.ModelSpace &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If &lt;BR /&gt;
  element.EntityType = 7 Then &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayAttributes = &lt;BR /&gt;
  element.GetAttributes &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For I = &lt;BR /&gt;
  LBound(ArrayAttributes) To UBound(ArrayAttributes) &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MsgBox "Attribute Text String : " &amp;amp; &lt;BR /&gt;
  ArrayAttributes(I).TextString &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;UserForm1.Hide &lt;BR /&gt;
  &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next &lt;BR /&gt;End If &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Next &lt;BR /&gt;
  &lt;BR /&gt;End Sub &lt;BR /&gt;
  &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
  &lt;/P&gt;&lt;P&gt;The attributetag "BR_ST" is the attribute I want to isolate, it is the &lt;BR /&gt;
  first one that lists in the message box's. You can email me direct at &lt;BR /&gt;
  norm.akin@blockbuster.com &lt;BR /&gt;
  &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 11 Sep 2003 15:41:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309147#M60729</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-11T15:41:38Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309148#M60730</link>
      <description>Yes my attribute is in the block called "BlockbusterBorder"  Your code addition works out well.  My next step is to put the text in Textbox1 which is easy. After that I am compiling a master list I might need help on but I want to try first on my own.  Thanks for the info.</description>
      <pubDate>Fri, 12 Sep 2003 05:29:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/i-need-to-extract-a-single-attribute/m-p/309148#M60730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-09-12T05:29:33Z</dc:date>
    </item>
  </channel>
</rss>

