<?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: Command in MDI mode in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326656#M33088</link>
    <description>&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;extern "C" AcRx::AppRetCode &lt;BR /&gt;
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;switch (msg) &lt;BR /&gt;
{&lt;BR /&gt;&amp;nbsp;case AcRx::kInitAppMsg:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;&amp;nbsp; &lt;U&gt;&lt;FONT&gt;&lt;BR /&gt;
size=3&amp;gt;&lt;STRONG&gt;acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&amp;nbsp; &lt;BR /&gt;
// This line insert please.&lt;BR /&gt;&amp;nbsp; initApp();&lt;BR /&gt;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp;case &lt;BR /&gt;
AcRx::kUnloadAppMsg:&lt;BR /&gt;&amp;nbsp; unloadApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
break;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;return AcRx::kRetOK;&lt;BR /&gt;}&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;"satya" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="mailto:satyaranjandas77@yahoo.com"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
size=2&amp;gt;satyaranjandas77@yahoo.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; wrote in &lt;BR /&gt;
message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
size=2&amp;gt;news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb&lt;/FONT&gt;&lt;/A&gt;&lt;FONT&gt;&lt;BR /&gt;
face=굴림 size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; Hi,&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; How can I write an AutoCAD command which will open a drawing &lt;BR /&gt;
and add a&lt;BR /&gt;&amp;gt; line to it and will close the drawing with saving the changes. &lt;BR /&gt;
Is there any&lt;BR /&gt;&amp;gt; way tro do it?&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Thanks&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
satya&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;/FONT&gt;</description>
    <pubDate>Tue, 18 Nov 2003 04:06:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-11-18T04:06:29Z</dc:date>
    <item>
      <title>Command in MDI mode</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326654#M33086</link>
      <description>Hi,&lt;BR /&gt;
    How can I write an AutoCAD command which will open a drawing and add a&lt;BR /&gt;
line to it and will close the drawing with saving the changes. Is there any&lt;BR /&gt;
way tro do it?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
satya</description>
      <pubDate>Tue, 18 Nov 2003 02:52:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326654#M33086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-18T02:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Command in MDI mode</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326655#M33087</link>
      <description>extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)&lt;BR /&gt;
{&lt;BR /&gt;
 switch (msg) {&lt;BR /&gt;
 case AcRx::kInitAppMsg:&lt;BR /&gt;
  acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;
  acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);  // This line insert please.&lt;BR /&gt;
  initApp();&lt;BR /&gt;
  break;&lt;BR /&gt;
 case AcRx::kUnloadAppMsg:&lt;BR /&gt;
  unloadApp();&lt;BR /&gt;
  break;&lt;BR /&gt;
 }&lt;BR /&gt;
 return AcRx::kRetOK;&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"satya" &lt;SATYARANJANDAS77&gt; wrote in message&lt;BR /&gt;
news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt;     How can I write an AutoCAD command which will open a drawing and add a&lt;BR /&gt;
&amp;gt; line to it and will close the drawing with saving the changes. Is there&lt;BR /&gt;
any&lt;BR /&gt;
&amp;gt; way tro do it?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt; satya&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SATYARANJANDAS77&gt;</description>
      <pubDate>Tue, 18 Nov 2003 04:05:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326655#M33087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-18T04:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Command in MDI mode</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326656#M33088</link>
      <description>&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;extern "C" AcRx::AppRetCode &lt;BR /&gt;
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;switch (msg) &lt;BR /&gt;
{&lt;BR /&gt;&amp;nbsp;case AcRx::kInitAppMsg:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;&amp;nbsp; &lt;U&gt;&lt;FONT&gt;&lt;BR /&gt;
size=3&amp;gt;&lt;STRONG&gt;acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&amp;nbsp; &lt;BR /&gt;
// This line insert please.&lt;BR /&gt;&amp;nbsp; initApp();&lt;BR /&gt;&amp;nbsp; break;&lt;BR /&gt;&amp;nbsp;case &lt;BR /&gt;
AcRx::kUnloadAppMsg:&lt;BR /&gt;&amp;nbsp; unloadApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
break;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;return AcRx::kRetOK;&lt;BR /&gt;}&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;"satya" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="mailto:satyaranjandas77@yahoo.com"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
size=2&amp;gt;satyaranjandas77@yahoo.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; wrote in &lt;BR /&gt;
message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
size=2&amp;gt;news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb&lt;/FONT&gt;&lt;/A&gt;&lt;FONT&gt;&lt;BR /&gt;
face=굴림 size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; Hi,&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; How can I write an AutoCAD command which will open a drawing &lt;BR /&gt;
and add a&lt;BR /&gt;&amp;gt; line to it and will close the drawing with saving the changes. &lt;BR /&gt;
Is there any&lt;BR /&gt;&amp;gt; way tro do it?&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Thanks&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
satya&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;/FONT&gt;</description>
      <pubDate>Tue, 18 Nov 2003 04:06:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326656#M33088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-18T04:06:29Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326657#M33089</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;My code contains that line and still the following &lt;BR /&gt;
code does not work as expected.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;The line does not get added to the new file but &lt;BR /&gt;
instead it gets added to the already opened drawing where the command was &lt;BR /&gt;
issued. Any suggestions?&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;AcDbDatabase* pNewDb = &lt;BR /&gt;
NULL;&lt;BR /&gt;&amp;nbsp;acdbHostApplicationServices()-&amp;gt;workingDatabase()-&amp;gt;wblock(pNewDb);&lt;BR /&gt;&amp;nbsp;pNewDb-&amp;gt;saveAs("E:\\TEMP\\1.dwg");&lt;BR /&gt;&amp;nbsp;delete &lt;BR /&gt;
pNewDb;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;BR /&gt;&amp;nbsp;IAcadApplication &lt;BR /&gt;
app;&lt;BR /&gt;&amp;nbsp;IAcadDocuments docs;&lt;BR /&gt;&amp;nbsp;IAcadDocument doc;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;app.AttachDispatch(acedGetAcadWinApp()-&amp;gt;GetIDispatch(TRUE));&lt;BR /&gt;&amp;nbsp;docs.AttachDispatch(app.GetDocuments());&lt;BR /&gt;&amp;nbsp;doc.AttachDispatch(docs.Open("E:\\TEMP\\1.dwg", &lt;BR /&gt;
COleVariant((short) FALSE, VT_BOOL)));&lt;BR /&gt;&amp;nbsp;doc.Activate();&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&amp;nbsp;acedCommand(RTSTR, "_LINE", RTSTR, "0,0,0", RTSTR, "10,10,0", &lt;BR /&gt;
RTNONE);&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"hanho park" &amp;lt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:hhpark@cadmax.co.kr"&amp;gt;hhpark@cadmax.co.kr&lt;/A&gt;&amp;gt; wrote in message &lt;BR /&gt;
  &lt;A&gt;&lt;BR /&gt;
  href="news:C71E49880F84A7480E3C238CDF2AAE0F@in.WebX.maYIadrTaRb"&amp;gt;news:C71E49880F84A7480E3C238CDF2AAE0F@in.WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;extern "C" AcRx::AppRetCode &lt;BR /&gt;
  acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;switch (msg) &lt;BR /&gt;
  {&lt;BR /&gt;&amp;nbsp;case AcRx::kInitAppMsg:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
  acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;&amp;nbsp; &lt;U&gt;&lt;FONT&gt;&lt;BR /&gt;
  size=3&amp;gt;&lt;STRONG&gt;acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&amp;nbsp; &lt;BR /&gt;
  // This line insert please.&lt;BR /&gt;&amp;nbsp; initApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
  break;&lt;BR /&gt;&amp;nbsp;case AcRx::kUnloadAppMsg:&lt;BR /&gt;&amp;nbsp; unloadApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
  break;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;return AcRx::kRetOK;&lt;BR /&gt;}&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;"satya" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:satyaranjandas77@yahoo.com"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
  size=2&amp;gt;satyaranjandas77@yahoo.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; wrote in &lt;BR /&gt;
  message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
  href="news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
  size=2&amp;gt;news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb&lt;/FONT&gt;&lt;/A&gt;&lt;FONT&gt;&lt;BR /&gt;
  face=굴림 size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; Hi,&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp; How can I write an AutoCAD command which will open a &lt;BR /&gt;
  drawing and add a&lt;BR /&gt;&amp;gt; line to it and will close the drawing with saving &lt;BR /&gt;
  the changes. Is there any&lt;BR /&gt;&amp;gt; way tro do it?&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;BR /&gt;
  Thanks&lt;BR /&gt;&amp;gt; satya&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 18 Nov 2003 05:03:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326657#M33089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-18T05:03:57Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326658#M33090</link>
      <description>&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;Hi. satya.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;Can not know in detail about your program.&lt;BR /&gt;But, &lt;BR /&gt;
there is contents that do not fit in form during code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;acedCommand(RTSTR, "_LINE", RTSTR, "0,0,0", RTSTR, &lt;BR /&gt;
"10,10,0", RTSTR, "", RTNONE);&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;Is sorry because do not help.&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;Best Regards.&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE dir="ltr"&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"satya" &amp;lt;&lt;A&gt;&lt;BR /&gt;
  href="mailto:satyaranjandas77@yahoo.com"&amp;gt;satyaranjandas77@yahoo.com&lt;/A&gt;&amp;gt; &lt;BR /&gt;
  wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:D5A757D644449FC7046049E2B1942E53@in.WebX.maYIadrTaRb"&amp;gt;news:D5A757D644449FC7046049E2B1942E53@in.WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;My code contains that line and still the &lt;BR /&gt;
  following code does not work as expected.&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;The line does not get added to the new file but &lt;BR /&gt;
  instead it gets added to the already opened drawing where the command was &lt;BR /&gt;
  issued. Any suggestions?&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;AcDbDatabase* pNewDb = &lt;BR /&gt;
  NULL;&lt;BR /&gt;&amp;nbsp;acdbHostApplicationServices()-&amp;gt;workingDatabase()-&amp;gt;wblock(pNewDb);&lt;BR /&gt;&amp;nbsp;pNewDb-&amp;gt;saveAs("E:\\TEMP\\1.dwg");&lt;BR /&gt;&amp;nbsp;delete &lt;BR /&gt;
  pNewDb;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;BR /&gt;&amp;nbsp;IAcadApplication &lt;BR /&gt;
  app;&lt;BR /&gt;&amp;nbsp;IAcadDocuments docs;&lt;BR /&gt;&amp;nbsp;IAcadDocument doc;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;nbsp;app.AttachDispatch(acedGetAcadWinApp()-&amp;gt;GetIDispatch(TRUE));&lt;BR /&gt;&amp;nbsp;docs.AttachDispatch(app.GetDocuments());&lt;BR /&gt;&amp;nbsp;doc.AttachDispatch(docs.Open("E:\\TEMP\\1.dwg", &lt;BR /&gt;
  COleVariant((short) FALSE, VT_BOOL)));&lt;BR /&gt;&amp;nbsp;doc.Activate();&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;DIV&gt;&amp;nbsp;acedCommand(RTSTR, "_LINE", RTSTR, "0,0,0", RTSTR, "10,10,0", &lt;BR /&gt;
  RTNONE);&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;
  &lt;BLOCKQUOTE&gt;&lt;BR /&gt;
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
    &lt;DIV&gt;"hanho park" &amp;lt;&lt;A&gt;&lt;BR /&gt;
    href="mailto:hhpark@cadmax.co.kr"&amp;gt;hhpark@cadmax.co.kr&lt;/A&gt;&amp;gt; wrote in &lt;BR /&gt;
    message &lt;A&gt;&lt;BR /&gt;
    href="news:C71E49880F84A7480E3C238CDF2AAE0F@in.WebX.maYIadrTaRb"&amp;gt;news:C71E49880F84A7480E3C238CDF2AAE0F@in.WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;&lt;BR /&gt;
    &lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;extern "C" AcRx::AppRetCode &lt;BR /&gt;
    acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;switch (msg) &lt;BR /&gt;
    {&lt;BR /&gt;&amp;nbsp;case AcRx::kInitAppMsg:&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
    acrxDynamicLinker-&amp;gt;unlockApplication(pkt);&lt;BR /&gt;&amp;nbsp; &lt;U&gt;&lt;FONT&gt;&lt;BR /&gt;
    size=3&amp;gt;&lt;STRONG&gt;acrxDynamicLinker-&amp;gt;registerAppMDIAware(pkt);&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/U&gt;&amp;nbsp; &lt;BR /&gt;
    // This line insert please.&lt;BR /&gt;&amp;nbsp; initApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
    break;&lt;BR /&gt;&amp;nbsp;case AcRx::kUnloadAppMsg:&lt;BR /&gt;&amp;nbsp; unloadApp();&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;
    break;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;return AcRx::kRetOK;&lt;BR /&gt;}&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
    &lt;DIV&gt;&lt;FONT face="굴림" size="2"&gt;"satya" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
    href="mailto:satyaranjandas77@yahoo.com"&amp;gt;&lt;FONT face="굴림"&gt;&lt;BR /&gt;
    size=2&amp;gt;satyaranjandas77@yahoo.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; wrote &lt;BR /&gt;
    in message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
    href="news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb"&amp;gt;&lt;FONT&gt;&lt;BR /&gt;
    face=굴림 &lt;BR /&gt;
    size=2&amp;gt;news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb&lt;/FONT&gt;&lt;/A&gt;&lt;FONT&gt;&lt;BR /&gt;
    face=굴림 size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="굴림" size="2"&gt;&amp;gt; Hi,&lt;BR /&gt;&amp;gt; &lt;BR /&gt;
    &amp;nbsp;&amp;nbsp;&amp;nbsp; How can I write an AutoCAD command which will open a &lt;BR /&gt;
    drawing and add a&lt;BR /&gt;&amp;gt; line to it and will close the drawing with saving &lt;BR /&gt;
    the changes. Is there any&lt;BR /&gt;&amp;gt; way tro do it?&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;BR /&gt;
    Thanks&lt;BR /&gt;&amp;gt; satya&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; &lt;BR /&gt;
&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 18 Nov 2003 16:53:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326658#M33090</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-18T16:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Command in MDI mode</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326659#M33091</link>
      <description>satya,&lt;BR /&gt;
&lt;BR /&gt;
You need a command running from the application context or call a function&lt;BR /&gt;
from application context.&lt;BR /&gt;
This will avoid the command to stop when the current document is changed due&lt;BR /&gt;
a new file or an open file process.&lt;BR /&gt;
&lt;BR /&gt;
Take a look at the following sample:&lt;BR /&gt;
&lt;BR /&gt;
\ObjectARX 2002\samples\docman&lt;BR /&gt;
&lt;BR /&gt;
(see acDocManager-&amp;gt;executeInApplicationContext(); calls)&lt;BR /&gt;
&lt;BR /&gt;
Also, be aware to treat zero document state as well.&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Fernando.&lt;BR /&gt;
&lt;BR /&gt;
"satya" &lt;SATYARANJANDAS77&gt; wrote in message&lt;BR /&gt;
news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt;     How can I write an AutoCAD command which will open a drawing and add a&lt;BR /&gt;
&amp;gt; line to it and will close the drawing with saving the changes. Is there&lt;BR /&gt;
any&lt;BR /&gt;
&amp;gt; way tro do it?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt; satya&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SATYARANJANDAS77&gt;</description>
      <pubDate>Fri, 21 Nov 2003 11:33:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326659#M33091</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-21T11:33:33Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326660#M33092</link>
      <description>WOW!!!!!!&lt;BR /&gt;
It worked.&lt;BR /&gt;
Thanks a TON.&lt;BR /&gt;
&lt;BR /&gt;
"Fernando P. Malard" &lt;FPMALARD&gt; wrote in message&lt;BR /&gt;
news:1492FAEDE8D4FBB81C3147653ED9C7DA@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; satya,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; You need a command running from the application context or call a function&lt;BR /&gt;
&amp;gt; from application context.&lt;BR /&gt;
&amp;gt; This will avoid the command to stop when the current document is changed&lt;BR /&gt;
due&lt;BR /&gt;
&amp;gt; a new file or an open file process.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Take a look at the following sample:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; \ObjectARX 2002\samples\docman&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; (see acDocManager-&amp;gt;executeInApplicationContext(); calls)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Also, be aware to treat zero document state as well.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Regards,&lt;BR /&gt;
&amp;gt; Fernando.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "satya" &lt;SATYARANJANDAS77&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:08B5573B49FDD12A780FA43B2BDE5AFE@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Hi,&lt;BR /&gt;
&amp;gt; &amp;gt;     How can I write an AutoCAD command which will open a drawing and add&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; &amp;gt; line to it and will close the drawing with saving the changes. Is there&lt;BR /&gt;
&amp;gt; any&lt;BR /&gt;
&amp;gt; &amp;gt; way tro do it?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &amp;gt; satya&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/SATYARANJANDAS77&gt;&lt;/FPMALARD&gt;</description>
      <pubDate>Thu, 27 Nov 2003 02:19:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/command-in-mdi-mode/m-p/326660#M33092</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-11-27T02:19:47Z</dc:date>
    </item>
  </channel>
</rss>

