<?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 using acedCommand to redefine a block insert in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379840#M25933</link>
    <description>In my code, Im checking to see if a particular block exists before atteming to insert a new one.&lt;BR /&gt;
If if does exist, I want to redefine it, but when I put a "yes" in the command string at the point&lt;BR /&gt;
where the insert command would ask for it, it doesnt seem to work. I still get the old block inserted.&lt;BR /&gt;
Can someone tell me what I have done wrong here, or if this is even possible this way?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Perry&lt;BR /&gt;
&lt;BR /&gt;
code snippet---------------------------------------------------------------------------------------&lt;BR /&gt;
if (blockExists)&lt;BR /&gt;
	acedCommand(RTSTR, "INSERT",	&lt;BR /&gt;
	RTSTR, windInfo.sTitleBlockToInsert,	//blockname,&lt;BR /&gt;
	RTSTR, "YES",				//answer redefinition prompt&lt;BR /&gt;
	RTSTR, "0,0",				//insertion point,&lt;BR /&gt;
	RTSHORT, 1,				//xscale,&lt;BR /&gt;
	RTSHORT, 1,				//yscale,&lt;BR /&gt;
	RTSHORT, 0,				//rotation angle&lt;BR /&gt;
	RTNONE);&lt;BR /&gt;
else&lt;BR /&gt;
	acedCommand(RTSTR, "INSERT",	&lt;BR /&gt;
	RTSTR, windInfo.sTitleBlockToInsert,	//blockname,&lt;BR /&gt;
	RTSTR, "0,0",				//insertion point,&lt;BR /&gt;
	RTSHORT, 1,				//xscale,&lt;BR /&gt;
	RTSHORT, 1,				//yscale,&lt;BR /&gt;
	RTSHORT, 0,				//rotation angle&lt;BR /&gt;
	RTNONE);</description>
    <pubDate>Thu, 14 Jul 2005 17:08:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-07-14T17:08:14Z</dc:date>
    <item>
      <title>using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379840#M25933</link>
      <description>In my code, Im checking to see if a particular block exists before atteming to insert a new one.&lt;BR /&gt;
If if does exist, I want to redefine it, but when I put a "yes" in the command string at the point&lt;BR /&gt;
where the insert command would ask for it, it doesnt seem to work. I still get the old block inserted.&lt;BR /&gt;
Can someone tell me what I have done wrong here, or if this is even possible this way?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Perry&lt;BR /&gt;
&lt;BR /&gt;
code snippet---------------------------------------------------------------------------------------&lt;BR /&gt;
if (blockExists)&lt;BR /&gt;
	acedCommand(RTSTR, "INSERT",	&lt;BR /&gt;
	RTSTR, windInfo.sTitleBlockToInsert,	//blockname,&lt;BR /&gt;
	RTSTR, "YES",				//answer redefinition prompt&lt;BR /&gt;
	RTSTR, "0,0",				//insertion point,&lt;BR /&gt;
	RTSHORT, 1,				//xscale,&lt;BR /&gt;
	RTSHORT, 1,				//yscale,&lt;BR /&gt;
	RTSHORT, 0,				//rotation angle&lt;BR /&gt;
	RTNONE);&lt;BR /&gt;
else&lt;BR /&gt;
	acedCommand(RTSTR, "INSERT",	&lt;BR /&gt;
	RTSTR, windInfo.sTitleBlockToInsert,	//blockname,&lt;BR /&gt;
	RTSTR, "0,0",				//insertion point,&lt;BR /&gt;
	RTSHORT, 1,				//xscale,&lt;BR /&gt;
	RTSHORT, 1,				//yscale,&lt;BR /&gt;
	RTSHORT, 0,				//rotation angle&lt;BR /&gt;
	RTNONE);</description>
      <pubDate>Thu, 14 Jul 2005 17:08:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379840#M25933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-14T17:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379841#M25934</link>
      <description>You show code that calls acedCommand, and&lt;BR /&gt;
passes variables as params, but you do not&lt;BR /&gt;
show what the actual value(s) of the variable(s)&lt;BR /&gt;
are, which means that it is difficult to help you,&lt;BR /&gt;
since we don't know what you're actually passing&lt;BR /&gt;
to acedCommand().&lt;BR /&gt;
&lt;BR /&gt;
I will take a guess, that your variable contains&lt;BR /&gt;
the name of the block, which isn't going to tell&lt;BR /&gt;
AutoCAD to redefine it.&lt;BR /&gt;
&lt;BR /&gt;
To redefine an existing block, you need to use&lt;BR /&gt;
blockname=filename (or blockname= if the block&lt;BR /&gt;
and filename are the same, and the file is in the &lt;BR /&gt;
search path).&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"perry" &lt;PERRY_LEETS&gt; wrote in message news:4901664@discussion.autodesk.com...&lt;BR /&gt;
In my code, Im checking to see if a particular block exists before atteming to insert a new one.&lt;BR /&gt;
If if does exist, I want to redefine it, but when I put a "yes" in the command string at the point&lt;BR /&gt;
where the insert command would ask for it, it doesnt seem to work. I still get the old block inserted.&lt;BR /&gt;
Can someone tell me what I have done wrong here, or if this is even possible this way?&lt;BR /&gt;
Thanks&lt;BR /&gt;
Perry&lt;BR /&gt;
&lt;BR /&gt;
code snippet---------------------------------------------------------------------------------------&lt;BR /&gt;
if (blockExists)&lt;BR /&gt;
acedCommand(RTSTR, "INSERT", &lt;BR /&gt;
RTSTR, windInfo.sTitleBlockToInsert, //blockname,&lt;BR /&gt;
RTSTR, "YES", //answer redefinition prompt&lt;BR /&gt;
RTSTR, "0,0", //insertion point,&lt;BR /&gt;
RTSHORT, 1, //xscale,&lt;BR /&gt;
RTSHORT, 1, //yscale,&lt;BR /&gt;
RTSHORT, 0, //rotation angle&lt;BR /&gt;
RTNONE);&lt;BR /&gt;
else&lt;BR /&gt;
acedCommand(RTSTR, "INSERT", &lt;BR /&gt;
RTSTR, windInfo.sTitleBlockToInsert, //blockname,&lt;BR /&gt;
RTSTR, "0,0", //insertion point,&lt;BR /&gt;
RTSHORT, 1, //xscale,&lt;BR /&gt;
RTSHORT, 1, //yscale,&lt;BR /&gt;
RTSHORT, 0, //rotation angle&lt;BR /&gt;
RTNONE);&lt;/PERRY_LEETS&gt;</description>
      <pubDate>Fri, 15 Jul 2005 04:17:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379841#M25934</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-15T04:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379842#M25935</link>
      <description>Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; You show code that calls acedCommand, and&lt;BR /&gt;
&amp;gt; passes variables as params, but you do not&lt;BR /&gt;
&amp;gt; show what the actual value(s) of the variable(s)&lt;BR /&gt;
&amp;gt; are, which means that it is difficult to help you,&lt;BR /&gt;
&amp;gt; since we don't know what you're actually passing&lt;BR /&gt;
&amp;gt; to acedCommand().&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I will take a guess, that your variable contains&lt;BR /&gt;
&amp;gt; the name of the block, which isn't going to tell&lt;BR /&gt;
&amp;gt; AutoCAD to redefine it.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; To redefine an existing block, you need to use&lt;BR /&gt;
&amp;gt; blockname=filename (or blockname= if the block&lt;BR /&gt;
&amp;gt; and filename are the same, and the file is in the &lt;BR /&gt;
&amp;gt; search path).&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
Yes Tony Im passing in a variable for the block name. In this case it evaluates to:&lt;BR /&gt;
"C:\Documents and Settings\perry\My Documents\My code\C++\Acad\tblocker 2002\Debug\title blocks\title-b2.dwg"&lt;BR /&gt;
So I thought this would redefine the block existing in the drawing by the name of "title-b2".&lt;BR /&gt;
Apparently, Im wrong about this.</description>
      <pubDate>Fri, 15 Jul 2005 18:40:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379842#M25935</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-15T18:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379843#M25936</link>
      <description>&amp;gt; Yes Tony Im passing in a variable for the block name. In this case it evaluates to:&lt;BR /&gt;
&amp;gt; "C:\Documents and Settings\perry\My Documents\My code\C++\Acad\tblocker 2002\Debug\title blocks\title-b2.dwg"&lt;BR /&gt;
&amp;gt; So I thought this would redefine the block existing in the drawing by the name of "title-b2".&lt;BR /&gt;
&amp;gt; Apparently, Im wrong about this.&lt;BR /&gt;
&lt;BR /&gt;
No comment?</description>
      <pubDate>Wed, 20 Jul 2005 20:24:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379843#M25936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-20T20:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379844#M25937</link>
      <description>No comment about what?&lt;BR /&gt;
&lt;BR /&gt;
I already mentioned that to redefine a block from a DWG &lt;BR /&gt;
file, you must use "blockname=filename" with INSERT, not&lt;BR /&gt;
just the filename.&lt;BR /&gt;
&lt;BR /&gt;
So, your parameter for the blockname with INSERT would&lt;BR /&gt;
be something like &lt;BR /&gt;
&lt;BR /&gt;
   "TITLE-B2=C:\...\title blocks\title-b2.dwg".&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"perry" &lt;PERRY_LEETS&gt; wrote in message news:4906918@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Yes Tony Im passing in a variable for the block name. In this case it evaluates to:&lt;BR /&gt;
&amp;gt; "C:\Documents and Settings\perry\My Documents\My code\C++\Acad\tblocker 2002\Debug\title blocks\title-b2.dwg"&lt;BR /&gt;
&amp;gt; So I thought this would redefine the block existing in the drawing by the name of "title-b2".&lt;BR /&gt;
&amp;gt; Apparently, Im wrong about this.&lt;BR /&gt;
&lt;BR /&gt;
No comment?&lt;/PERRY_LEETS&gt;</description>
      <pubDate>Wed, 20 Jul 2005 21:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379844#M25937</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-20T21:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: using acedCommand to redefine a block insert</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379845#M25938</link>
      <description>Tony Tanzillo wrote:&lt;BR /&gt;
&amp;gt; No comment about what?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I already mentioned that to redefine a block from a DWG &lt;BR /&gt;
&amp;gt; file, you must use "blockname=filename" with INSERT, not&lt;BR /&gt;
&amp;gt; just the filename.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; So, your parameter for the blockname with INSERT would&lt;BR /&gt;
&amp;gt; be something like &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt;    "TITLE-B2=C:\...\title blocks\title-b2.dwg".&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
Ok, I was not aware of the need for the "dwg=..." part in front of the path name.&lt;BR /&gt;
Thanks&lt;BR /&gt;
Perry</description>
      <pubDate>Thu, 21 Jul 2005 18:12:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/using-acedcommand-to-redefine-a-block-insert/m-p/1379845#M25938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-21T18:12:33Z</dc:date>
    </item>
  </channel>
</rss>

