<?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: AttipEdit command with C sharp, VB.net or lisp? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7078096#M31583</link>
    <description>&lt;P&gt;Is there a way I could&amp;nbsp;use that code in a loop (or Attipedit command) into a loop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to select many blocks in a window or crossing at once and filter out the attributes&lt;/P&gt;
&lt;P&gt;from the selection set to edit them in a&amp;nbsp;short dalog box. I would like to edit the attributes&amp;nbsp;in&lt;/P&gt;
&lt;P&gt;a loop starting from the upper&amp;nbsp;right attribute to lower left attribute in a rolling loop&amp;nbsp;that was&lt;/P&gt;
&lt;P&gt;selected in the selection set. Is it possable to do that using Net, Lisp or whatever?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be select, edit&amp;nbsp;attribute in dialog box, hit return for the next attribute untill all attributes are edited.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 May 2017 17:33:38 GMT</pubDate>
    <dc:creator>muckmailer</dc:creator>
    <dc:date>2017-05-11T17:33:38Z</dc:date>
    <item>
      <title>AttipEdit command with C sharp, VB.net or lisp?</title>
      <link>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7077524#M31581</link>
      <description>&lt;P&gt;Is there an C sharp, VB.net or lisp routine that is equivlent&lt;BR /&gt;&amp;nbsp;to the Attipedit command?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The AttipEdit command allows a user to select an attribute&lt;BR /&gt;&amp;nbsp;in a block reference and directly edit it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Most C sharp vb.net or lisp routines has the user to&lt;BR /&gt;&amp;nbsp;select the block and then the program extracts the attribute&lt;BR /&gt;&amp;nbsp;for a block defination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 14:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7077524#M31581</guid>
      <dc:creator>muckmailer</dc:creator>
      <dc:date>2017-05-11T14:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: AttipEdit command with C sharp, VB.net or lisp?</title>
      <link>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7077611#M31582</link>
      <description>&lt;P&gt;To edit attribute value, if you can use LISP in your workflow, you can just call the command "ATTIPEDIT" in list statement like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(command "ATTIPEDIT",....).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a .NET API routine that can be used in your .NET addins, you look at Editor.GetNestedEntity() to allow user to select an attribute in a block reference. Once an attribute is selected (the code then knows its ObjectId), you are free to do whatever you want to the attribute selected. the code (in C#) would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;private void EditAtt(Editor ed)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; var opt=new PromptNestedEntityOptions("\nPick an attribute:");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; var res=ed.GetNestedEntity(opt);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if (res.Status==PromptStatus.OK)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ChangeAttValue(res.ObjectId, ed);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;private void ChangeAttValue(ObjectId attId, Editor ed)&lt;/P&gt;
&lt;P&gt;{&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; using (var tran=attId.Database.TransactionManager.StartTransaction())&lt;/P&gt;
&lt;P&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; var att=tran.GteObject(attId, OpenMode.ForRead) As AttributeReference;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; if (att!=null)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ed.WriteMessage("\nCurrent Attribute Value: {0}", att.TextString);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var attValueRes=ed.GetString("\nEnter new attribute value:");&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (attValueRes.Status==PromptStatus.OK)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; att.UpgradeOpen();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; att.TextString=attValueres.StringValue;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; tran.Commit();&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, after user picks an attribute, you can show a data input form as dialog box (but in this case, I'd ask user to pick block, and display all attributes on the form for user to edit).&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 14:57:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7077611#M31582</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-05-11T14:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: AttipEdit command with C sharp, VB.net or lisp?</title>
      <link>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7078096#M31583</link>
      <description>&lt;P&gt;Is there a way I could&amp;nbsp;use that code in a loop (or Attipedit command) into a loop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to select many blocks in a window or crossing at once and filter out the attributes&lt;/P&gt;
&lt;P&gt;from the selection set to edit them in a&amp;nbsp;short dalog box. I would like to edit the attributes&amp;nbsp;in&lt;/P&gt;
&lt;P&gt;a loop starting from the upper&amp;nbsp;right attribute to lower left attribute in a rolling loop&amp;nbsp;that was&lt;/P&gt;
&lt;P&gt;selected in the selection set. Is it possable to do that using Net, Lisp or whatever?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be select, edit&amp;nbsp;attribute in dialog box, hit return for the next attribute untill all attributes are edited.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 17:33:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attipedit-command-with-c-sharp-vb-net-or-lisp/m-p/7078096#M31583</guid>
      <dc:creator>muckmailer</dc:creator>
      <dc:date>2017-05-11T17:33:38Z</dc:date>
    </item>
  </channel>
</rss>

