Message 1 of 6
using acedCommand to redefine a block insert

Not applicable
07-14-2005
10:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In my code, Im checking to see if a particular block exists before atteming to insert a new one.
If if does exist, I want to redefine it, but when I put a "yes" in the command string at the point
where the insert command would ask for it, it doesnt seem to work. I still get the old block inserted.
Can someone tell me what I have done wrong here, or if this is even possible this way?
Thanks
Perry
code snippet---------------------------------------------------------------------------------------
if (blockExists)
acedCommand(RTSTR, "INSERT",
RTSTR, windInfo.sTitleBlockToInsert, //blockname,
RTSTR, "YES", //answer redefinition prompt
RTSTR, "0,0", //insertion point,
RTSHORT, 1, //xscale,
RTSHORT, 1, //yscale,
RTSHORT, 0, //rotation angle
RTNONE);
else
acedCommand(RTSTR, "INSERT",
RTSTR, windInfo.sTitleBlockToInsert, //blockname,
RTSTR, "0,0", //insertion point,
RTSHORT, 1, //xscale,
RTSHORT, 1, //yscale,
RTSHORT, 0, //rotation angle
RTNONE);
If if does exist, I want to redefine it, but when I put a "yes" in the command string at the point
where the insert command would ask for it, it doesnt seem to work. I still get the old block inserted.
Can someone tell me what I have done wrong here, or if this is even possible this way?
Thanks
Perry
code snippet---------------------------------------------------------------------------------------
if (blockExists)
acedCommand(RTSTR, "INSERT",
RTSTR, windInfo.sTitleBlockToInsert, //blockname,
RTSTR, "YES", //answer redefinition prompt
RTSTR, "0,0", //insertion point,
RTSHORT, 1, //xscale,
RTSHORT, 1, //yscale,
RTSHORT, 0, //rotation angle
RTNONE);
else
acedCommand(RTSTR, "INSERT",
RTSTR, windInfo.sTitleBlockToInsert, //blockname,
RTSTR, "0,0", //insertion point,
RTSHORT, 1, //xscale,
RTSHORT, 1, //yscale,
RTSHORT, 0, //rotation angle
RTNONE);