<?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 wblock function returns eVetoed in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3484928#M14698</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my ObjectARX application, I am trying to copy the entities from current drawing into a target drawing. For this, I am using AcDbDatabase::wblock function but it returns me error status as eVetoed. Following is extract of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDbDatabase pFlatDb = &lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; AcDbDatabase(&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;, &lt;/FONT&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;AcDbObjectIdArray tmpArray;&lt;/P&gt;&lt;P&gt;-- //some code to populate tmpArray&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;//pCurDb is current database&lt;/P&gt;&lt;P&gt;Acad::ErrorStatus es = pCurDb-&amp;gt;wblock(pFlatDb, tmpArray, AcGePoint3d::kOrigin, AcDb::kDrcIgnore);&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;(Acad::eOk != es)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;acutPrintf(L&lt;FONT size="2" color="#a31515"&gt;&lt;FONT size="2" color="#a31515"&gt;"\nFailed to copy geometry into new drawing: %s"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;, acadErrorStatusText(es));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000"&gt;&lt;FONT size="2" color="#008000"&gt;delete pFlatDb;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application crashes at the line where I&amp;nbsp;delete the target database (delete pFlatDb).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong here? What could be the reason for return status eVetoed and how to handle this situation so that crash does not occur?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jun 2012 04:44:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-05T04:44:38Z</dc:date>
    <item>
      <title>wblock function returns eVetoed</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3484928#M14698</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my ObjectARX application, I am trying to copy the entities from current drawing into a target drawing. For this, I am using AcDbDatabase::wblock function but it returns me error status as eVetoed. Following is extract of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcDbDatabase pFlatDb = &lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt; AcDbDatabase(&lt;/FONT&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;, &lt;/FONT&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;true&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;AcDbObjectIdArray tmpArray;&lt;/P&gt;&lt;P&gt;-- //some code to populate tmpArray&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;//pCurDb is current database&lt;/P&gt;&lt;P&gt;Acad::ErrorStatus es = pCurDb-&amp;gt;wblock(pFlatDb, tmpArray, AcGePoint3d::kOrigin, AcDb::kDrcIgnore);&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;(Acad::eOk != es)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;acutPrintf(L&lt;FONT size="2" color="#a31515"&gt;&lt;FONT size="2" color="#a31515"&gt;"\nFailed to copy geometry into new drawing: %s"&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;, acadErrorStatusText(es));&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#008000"&gt;&lt;FONT size="2" color="#008000"&gt;delete pFlatDb;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000ff"&gt;&lt;FONT size="2" color="#0000ff"&gt;return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The application crashes at the line where I&amp;nbsp;delete the target database (delete pFlatDb).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong here? What could be the reason for return status eVetoed and how to handle this situation so that crash does not occur?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 04:44:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3484928#M14698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T04:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: wblock function returns eVetoed</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3485406#M14699</link>
      <description>&lt;P&gt;You don't say here what context your code is executing in when the problem occurs,&amp;nbsp;but that is likely a factor. I recommend to try testing this code in a standard command handler function in a simple module with no reactors or other add-ons loaded, then add things until the error occurs.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2012 13:09:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3485406#M14699</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2012-06-05T13:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: wblock function returns eVetoed</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3487356#M14700</link>
      <description>&lt;P&gt;try to lock current database at the beginning of your function.&lt;/P&gt;&lt;P&gt;#include &amp;lt;axlock.h&amp;gt;&lt;/P&gt;&lt;P&gt;...&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcAxDocLock docLock(pCurDb);&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 13:06:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/wblock-function-returns-evetoed/m-p/3487356#M14700</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-06T13:06:51Z</dc:date>
    </item>
  </channel>
</rss>

