<?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: Alternative Attribute command in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477284#M55357</link>
    <description />
    <pubDate>Wed, 30 May 2012 12:55:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-05-30T12:55:30Z</dc:date>
    <item>
      <title>Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3475470#M55354</link>
      <description>&lt;P&gt;Hi, I want write a command for attribute editing. The command check if the block name is equal to a string and if yes make some operation, if no continue with DDEDIT standard command.&lt;/P&gt;&lt;P&gt;The program work well if the block name is not the some of the string. When the name is the some the program make the correct operation but then run also the ddedit command.&lt;/P&gt;&lt;P&gt;there is a way for break the command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Runtime&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.DatabaseServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.ApplicationServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Geometry&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.EditorInput&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Colors&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System.Windows.Forms&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Math&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;'Imports System.Web.Mail&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Microsoft.Office.Core&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Microsoft.Office.Interop&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;'Imports Microsoft.Office.Interop.Outlook&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System.Runtime.InteropServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Interop&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Public &lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;reactor&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; bEditCommand &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Boolean&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; bDoRepositioning &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Boolean&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"AddEvents"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;plantDbEvents()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; doc &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Document&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; = Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.DocumentManager.MdiActiveDocument&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; db &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Database&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;HostApplicationServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.WorkingDatabase()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;'AddHandler db.ObjectOpenedForModify, New ObjectEventHandler(AddressOf objOpenedForMod)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;AddHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; doc.CommandWillStart, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;CommandEventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;AddressOf&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;cmdWillStart)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;'AddHandler doc.CommandEnded, New CommandEventHandler(AddressOf cmdEnded)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bEditCommand =&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;False&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;bDoRepositioning =&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;False&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; cmdWillStart(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; o &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; e &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;CommandEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; ed &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Editor&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; = Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.DocumentManager.MdiActiveDocument.Editor&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Try&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; e.GlobalCommandName = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"DDEDIT"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Or&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; e.GlobalCommandName = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"EATTEDIT"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; fr2 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Ferri&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; strNomeBlocco &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myDwg &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Document&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;'Dim myBT As BlockTable&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;'Dim myBTR As BlockTableRecord&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myDB &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; DatabaseServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Database&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myTransMan &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; DatabaseServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;TransactionManager&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myTrans &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; DatabaseServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Transaction&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myEd &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Editor&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myPSR &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;PromptSelectionResult&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; TargetBlockRef &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; DatabaseServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;BlockReference&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myDB = ApplicationServices.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.DocumentManager.MdiActiveDocument.Database&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myDwg = Autodesk.AutoCAD.ApplicationServices.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.DocumentManager.MdiActiveDocument&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;strNomeBlocco =&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"FERRI-P"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myTransMan = myDB.TransactionManager&lt;/P&gt;&lt;P&gt;myTrans = myTransMan.StartTransaction&lt;/P&gt;&lt;P&gt;myEd = myDwg.Editor&lt;/P&gt;&lt;P&gt;a2: myPSR = myEd.SelectImplied&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;myPSR.Status&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;PromptStatus&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.OK&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;myPSR.Value.Count&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; mySelobj &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;SelectedObject&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; myAcadEnt &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; DatabaseServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Entity&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;For&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; I = 1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;To&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;myPSR.Value.Count&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;mySelobj = myPSR.Value.Item(I - 1)&lt;/P&gt;&lt;P&gt;myAcadEnt = mySelobj.ObjectId.GetObject(DatabaseServices.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;OpenMode&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.ForRead)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;TargetBlockRef = myAcadEnt&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; Microsoft.VisualBasic.Left$(UCase(TargetBlockRef.Name), 5) = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"FERRI"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;fr2.Show()&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;GoTo&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;A15&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Next&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;I&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Is&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&amp;gt; 1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;MsgBox(&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"Seleziona un solo blocco delle Posizioni"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;myPSR =&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Nothing&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;GoTo&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;a2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;PromptStatus&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.Error&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;' GoTo a3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;&lt;FONT size="2" color="#008000" face="Consolas"&gt;' &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Case&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; EditorInput.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;PromptStatus&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;.Cancel&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Select&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Catch&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; ex &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt; System.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;&lt;FONT size="2" color="#2b91af" face="Consolas"&gt;Exception&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ed.WriteMessage(&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;&lt;FONT size="2" color="#a31515" face="Consolas"&gt;"Error in cmdWillStart: "&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;+ ex.Message)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Try&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;A15:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;&lt;FONT size="2" color="#0000ff" face="Consolas"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 13:20:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3475470#M55354</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-29T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3475690#M55355</link>
      <description>&lt;P&gt;Handling CommandWillStart event will not meet your need, as you have already found out, because no matter what you do in the event handler, it is just something you can do before the command starts, after your code runs, the command will still run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To your need, you can handle DocumentCollection.DocumentLockModeChanged event and DocumentCollection.DocumentLockModeChangeVetoed event. That is, in the DocumentLockModeChanged event handler, if a certain condition is met, you can then veto the command, which will result in the DocumentLockModeChangeVetoed event being fired. Then in DocumentLockModeChangeVetoed event handler, you can start your own process/custom command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some psuedo code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private static bool runAlternativeCmd=false;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public void Initialize()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DocumentCollection docs=Application.DocumentManager;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; docs.DocumentLockModeChanged+=new DocumentLockModeChangedEventHandler(DocLockChanged);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; docs.DocumentLockModeChangeVetoed+=new DocumentLockModeChangeVetoedEventHandler(DocLockChangeVetoed);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void DocLockChanged(object sender, DocumentLockModeChangedEventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.GlobalCommandName.ToUpper()=="XXXXXXX")&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;&amp;nbsp;&amp;nbsp; //Test if the entity in the implied selectionset is the targeting block. If it is, veto the command&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runAlternativeCmd=true;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; runAlternativeCmd=false;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void DocLockChaneVetoed(object sender, DocumentLockChangeVetoedEventArgs e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (runAlternativeCmd)&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document doc=Application.DocumentManager/MdiDocument;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; doc.SendStringToExcute("MyAttrEdit ",true, false, false);&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;&lt;/P&gt;&lt;P&gt;[CoommandMethod["MyAttrEdit")]&lt;/P&gt;&lt;P&gt;public static void EditMyAttribute()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do my own editing process&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 14:58:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3475690#M55355</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-05-29T14:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3476038#M55356</link>
      <description>&lt;P&gt;Here are two ADN DevBlog entries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Get the real name of a block if it is anonymous (necessary for dynamic blocks):&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/05/identifying-block-name-from-the-block-reference.html"&gt;http://adndevblog.typepad.com/autocad/2012/05/identifying-block-name-from-the-block-reference.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Veto a command as described above:&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/05/veto-a-particular-command-in-autocad.html"&gt;http://adndevblog.typepad.com/autocad/2012/05/veto-a-particular-command-in-autocad.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2012 17:43:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3476038#M55356</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2012-05-29T17:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477284#M55357</link>
      <description />
      <pubDate>Wed, 30 May 2012 12:55:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477284#M55357</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-30T12:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477310#M55358</link>
      <description>&lt;P&gt;Thamks&lt;/P&gt;&lt;P&gt;I must use the DLL with AutoCAD 2013 but there is an error&lt;/P&gt;&lt;P&gt;I have convert C code in Vb.net code, this is the result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Runtime&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.DatabaseServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.ApplicationServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Geometry&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.EditorInput&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;Autodesk.AutoCAD.Colors&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System.Windows.Forms&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT size="2" face="Consolas"&gt;&lt;FONT size="2" face="Consolas"&gt;System.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Math&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;'Imports System.Web.Mail&lt;/P&gt;&lt;P&gt;Imports &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;System.Runtime.InteropServices&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;Autodesk.AutoCAD.Interop&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Imports &lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;System.Collections.Specialized&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Public &lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Class2&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"AddVetoToQuit"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Shared&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;AddVetoToQuit()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; doc &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentCollection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;doc.DocumentLockModeChanged +=&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentLockModeChangedEventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;doc_DocumentLockModeChanged)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"RemoveVetoToQuit"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Shared&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;RemoveVetoToQuit()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; doc &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentCollection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; = ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;doc.DocumentLockModeChanged -=&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentLockModeChangedEventHandler(&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;doc_DocumentLockModeChanged)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Private&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Shared&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; doc_DocumentLockModeChanged(sender &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, e &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentLockModeChangedEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;String&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.Compare(e.GlobalCommandName, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"QUIT"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;True&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;) = 0 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;e.Veto()&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;End &lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 13:01:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477310#M55358</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-30T13:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477364#M55359</link>
      <description>&lt;P&gt;I do not think you can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Object.Event +=EventHandler(...) in VB.NET.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should look into AddHandler/RemoveHandler statement in VB.NET, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AddHandler Object.Event, Address Of EventHandlerName&lt;/P&gt;&lt;P&gt;RemoveHandler Object.Event, Address Of EventHandlerName&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 13:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477364#M55359</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-05-30T13:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477506#M55360</link>
      <description>&lt;P&gt;l&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:33:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477506#M55360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-30T14:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477514#M55361</link>
      <description>&lt;P&gt;Like this? But I receive an error on "Autodesk.AutoCAD.ApplicationServices.&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentCollection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentLockModeChanged"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Public&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;veto&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"AddDocColEvent"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;AddDocColEvent()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;AddHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentCollection&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentLockModeChanged, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;AddressOf&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;docColDocAct&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"RemoveDocColEvent"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;RemoveDocColEvent()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;RemoveHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager.DocumentActivated, _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;AddressOf&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;docColDocAct&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; docColDocAct(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; senderObj &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; docColDocActEvtArgs &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentCollectionEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ApplicationServices.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.ShowAlertDialog(docColDocActEvtArgs.Document.Name &amp;amp; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;" was activated."&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:35:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477514#M55361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-30T14:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477566#M55362</link>
      <description>&lt;P&gt;Well, carefully looking into the compiling error would reveal something obviously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You added event handler to handle DocumentLockModeChanged event, but you remove a handler on DocumentActivated event, which is never been added in the first place.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. The event handler docColDocAct() cannot be used to handle DocumentLockModeChanged event, because the handler's signature is wrong. Event handler for DocumentLockModeChanged requires the second argumnet of the handler to be type of DocumentLockModeChangedEventArgs, not DocumentCollectionEventArgs.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2012 14:52:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3477566#M55362</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-05-30T14:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3478916#M55363</link>
      <description>&lt;P&gt;Have you a VB.NET example?&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 07:47:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3478916#M55363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-31T07:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3479384#M55364</link>
      <description>&lt;P&gt;I try this but don't work...&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;CommandMethod&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;"AddDocColEvent"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&amp;gt; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;AddDocColEvent()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Dim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; doc &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; Autodesk.AutoCAD.ApplicationServices.&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Document&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;doc = Autodesk.AutoCAD.ApplicationServices.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.DocumentManager.MdiActiveDocument&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;AddHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; doc.DocumentLockModeChanged, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;New&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;ObjectEventHandler&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;AddressOf&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;docColDocAct)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Public&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; docColDocAct(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;ByVal&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt; sender &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Object&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;, docColDocActEvtArgs &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;As&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;DocumentLockModeChangedEventArgs&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;ApplicationServices.&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;&lt;FONT face="Consolas" color="#2b91af" size="2"&gt;Application&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;.ShowAlertDialog(docColDocActEvtArgs.Document.Name &amp;amp; _&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;&lt;FONT face="Consolas" color="#a31515" size="2"&gt;" was activated."&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;End&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Sub&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;End&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;&lt;FONT face="Consolas" color="#0000ff" size="2"&gt;Class&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 13:35:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3479384#M55364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-31T13:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3479462#M55365</link>
      <description>&lt;P&gt;Did you try to compile your code (or did get intellisense prompt when writing the code in VB editor)? Document class DOES NOT have event DocumentLockModeChanged event. So, I am wondering how you write your code without intellisense prompt&amp;nbsp;and how you compile your code without error. It is DocumentCollection class that has event DocumentLockModeChanged/DocumentLockModeChangeVetoed event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I put together some quick code, assuming that under certain codition, you do not want SAVE/QSAVE command run, instead, you run your own custom command. Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.EditorInput

&amp;lt;Assembly: CommandClass(GetType(AlternativeCommandVB.AlternativeCmd))&amp;gt; 
&amp;lt;Assembly: ExtensionApplication(GetType(AlternativeCommandVB.AlternativeCmd))&amp;gt; 

Public Class AlternativeCmd
    Implements IExtensionApplication

    Private Shared docs As DocumentCollection = Nothing
    Private Shared _dwgName As String = ""
    Private Shared _runAltCmd As Boolean = False
    Private Const TARGET_CMD = "SAVE"

    Public Sub Initialize() _
            Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize

        docs = Application.DocumentManager

        AddHandler docs.DocumentLockModeChanged, _
            AddressOf Docs_DocumentLockModeChanged

        AddHandler docs.DocumentLockModeChangeVetoed, _
            AddressOf Docs_DocumentLockModeChangeVetoed

    End Sub

    Public Sub Terminate() _
        Implements Autodesk.AutoCAD.Runtime.IExtensionApplication.Terminate

    End Sub

    Private Sub Docs_DocumentLockModeChanged( _
                sender As Object, e As DocumentLockModeChangedEventArgs)

        _dwgName = e.Document.Name
        _runAltCmd = False

        If e.GlobalCommandName.ToUpper().Contains(TARGET_CMD) Then
            If CheckVetoCondition(e.Document) Then
                _runAltCmd = True
                e.Veto()
            End If
        End If

    End Sub

    Private Sub Docs_DocumentLockModeChangeVetoed( _
                sender As Object, e As DocumentLockModeChangeVetoedEventArgs)

        If _runAltCmd AndAlso _dwgName.ToUpper() = e.Document.Name.ToUpper() Then

            e.Document.Editor.WriteMessage(vbCr &amp;amp; "Command """ &amp;amp; _
                                           TARGET_CMD &amp;amp; """ has been vetoed")
            e.Document.SendStringToExecute("MyAltCmd ", True, False, True)

        End If

    End Sub

    &amp;lt;CommandMethod("MyAltCmd")&amp;gt; _
    Public Shared Sub RunMyCustomCmd()

        Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
        ed.WriteMessage(vbCr &amp;amp; _
                        "Execute my coomand, instead of ""Save"" command....Done" &amp;amp; vbCr)

    End Sub

    Private Function CheckVetoCondition(dwg As Document) As Boolean
        ''Do needed condition test
        Return True
    End Function

End Class&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Start AutoCAD and load this project. Then enter command SAVE or QSAVE, you would see from command line that the SAVE/QSAVE command is vetoed and the custom command "MyAltCmd" runs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2012 14:11:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3479462#M55365</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-05-31T14:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative Attribute command</title>
      <link>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3483410#M55366</link>
      <description>&lt;P&gt;Thanks now work correctly!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 10:29:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/alternative-attribute-command/m-p/3483410#M55366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T10:29:32Z</dc:date>
    </item>
  </channel>
</rss>

