<?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: Modify a selected attribute value in a block in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2928520#M61763</link>
    <description>&lt;P&gt;Thanks Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it solved my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2011 14:59:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-02-24T14:59:26Z</dc:date>
    <item>
      <title>Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927110#M61760</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to modify an attribute value in a block which I can select it on screen. The question is: when selecting the block, if the entity I pick is an attribute part of the block, can I get the attribute's tag? What I am trying to do is to update a revision block, changing one particular value but the attribute's tag it is not the same it can be different from drawing to drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 17:17:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927110#M61760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-23T17:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927272#M61761</link>
      <description>&lt;P&gt;You can use Editor.GetNestedEntity() to allow user to directly&amp;nbsp;pick an&amp;nbsp;AttributeReference&amp;nbsp;inside a BlockReference. Then update the Attributereference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2011 18:34:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927272#M61761</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2011-02-23T18:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927976#M61762</link>
      <description>&lt;P&gt;Yuan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;About the getnestedentity()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My situation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm standing in paperspace. This has one vp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i use the above method to select an entity in the vp wich i've not opend. So i need to select an entity(drawn in modelspace) while standing in paperspace. I need the to get xrecord information so i can automate my annotation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you understand my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise please let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Irvin&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2011 08:52:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2927976#M61762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-24T08:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2928520#M61763</link>
      <description>&lt;P&gt;Thanks Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it solved my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.G.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2011 14:59:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2928520#M61763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-24T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2929138#M61764</link>
      <description>How ?</description>
      <pubDate>Thu, 24 Feb 2011 20:04:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2929138#M61764</guid>
      <dc:creator>kerry_w_brown</dc:creator>
      <dc:date>2011-02-24T20:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Modify a selected attribute value in a block</title>
      <link>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2929184#M61765</link>
      <description>&lt;P&gt;Here is the sample&amp;nbsp;code(might need some adjusment): whatever text I have in the clipboard I'll paste it into attribute:&lt;/P&gt;&lt;PRE&gt;    &amp;lt;CommandMethod("44")&amp;gt; _
    Public Sub UpdateAttributeValue()


        Dim doc As Document = Application.DocumentManager.MdiActiveDocument
        Dim ed As Editor = doc.Editor
        Dim rs As PromptNestedEntityResult = ed.GetNestedEntity(vbLf &amp;amp; "Select attribute: ")
        Dim sTemp As String = String.Empty
        sTemp = My.Computer.Clipboard.GetText

        If sTemp = String.Empty Then
            MsgBox("There is no text in clipboard. Please copy some..")
            Return
        End If

        If rs.Status = PromptStatus.OK Then
            Dim oid As ObjectId = rs.ObjectId

            Using tr As Transaction = doc.TransactionManager.StartTransaction()

                Dim ent As Entity = DirectCast(tr.GetObject(oid, OpenMode.ForRead), Entity)

                If TypeOf ent Is AttributeReference Then
                    Dim attref As AttributeReference = DirectCast(ent, AttributeReference)
                    attref.UpgradeOpen()
                    attref.TextString = sTemp
                End If


                tr.Commit()

            End Using
        End If

    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;E.G.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2011 20:17:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/modify-a-selected-attribute-value-in-a-block/m-p/2929184#M61765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-24T20:17:44Z</dc:date>
    </item>
  </channel>
</rss>

