<?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: What's the best way to refresh the drawing after adding blocks? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413391#M84055</link>
    <description>I'm fairly sure the call to AddNewlyCreatedDBObject is working, but I've &lt;BR /&gt;
attached the code for actually inserting the blocks into AutoCAD just in &lt;BR /&gt;
case.&lt;BR /&gt;
&lt;BR /&gt;
I've tried all sorts of stuff.  Can you see the problem?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Carlos&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936905@discussion.autodesk.com...&lt;BR /&gt;
Since you're doing this in a modal command handler,&lt;BR /&gt;
there should be no problem like this.&lt;BR /&gt;
&lt;BR /&gt;
You're not showing the whole picture, so can you&lt;BR /&gt;
confirm that the code that creates the new entities&lt;BR /&gt;
calsl AddNewlyCreatedDBObject() ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936876@discussion.autodesk.com...&lt;BR /&gt;
Thanks very much for your help so far, but FlushGraphics doesn't seem to be&lt;BR /&gt;
doing the trick.  Am I calling it incorrectly?  My code is attached in a&lt;BR /&gt;
text file.&lt;BR /&gt;
&lt;BR /&gt;
I've noticed that the PAN command seems to be the only thing that will make&lt;BR /&gt;
things work (as opposed to what I thought earlier).  If I insert the blocks&lt;BR /&gt;
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that&lt;BR /&gt;
was inserted remains invisible until I pan.  If I move my mouse over the&lt;BR /&gt;
block, a do&lt;BR /&gt;
tted outline appears, but the block does not remain visible until&lt;BR /&gt;
I pan.&lt;BR /&gt;
&lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936836@discussion.autodesk.com...&lt;BR /&gt;
There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &amp;lt;&lt;BR /&gt;
carlos at sensametrics dot com&amp;gt; wrote in message&lt;BR /&gt;
news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not&lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but&lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
&lt;BR /&gt;
    db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.cadd&lt;BR /&gt;
zone.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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish thi&lt;BR /&gt;
s from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/TONY.TANZILLO&gt;&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;</description>
    <pubDate>Wed, 24 Aug 2005 19:05:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-08-24T19:05:20Z</dc:date>
    <item>
      <title>What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413385#M84049</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a &lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan &lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I &lt;BR /&gt;
accomplish this from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos</description>
      <pubDate>Tue, 23 Aug 2005 19:26:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413385#M84049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-23T19:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413386#M84050</link>
      <description>Have you tried calling TransactionManager.FlushGraphics ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a &lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan &lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I &lt;BR /&gt;
accomplish this from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;</description>
      <pubDate>Tue, 23 Aug 2005 22:01:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413386#M84050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-23T22:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413387#M84051</link>
      <description>That sounds like what I want, but for some reason FlushGraphics is not &lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but &lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
                                                                        db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish this from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;</description>
      <pubDate>Tue, 23 Aug 2005 23:07:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413387#M84051</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-23T23:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413388#M84052</link>
      <description>There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not &lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but &lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
                                                                        db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish this from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/CARLOS&gt;</description>
      <pubDate>Tue, 23 Aug 2005 23:28:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413388#M84052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-23T23:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413389#M84053</link>
      <description>Thanks very much for your help so far, but FlushGraphics doesn't seem to be &lt;BR /&gt;
doing the trick.  Am I calling it incorrectly?  My code is attached in a &lt;BR /&gt;
text file.&lt;BR /&gt;
&lt;BR /&gt;
I've noticed that the PAN command seems to be the only thing that will make &lt;BR /&gt;
things work (as opposed to what I thought earlier).  If I insert the blocks &lt;BR /&gt;
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that &lt;BR /&gt;
was inserted remains invisible until I pan.  If I move my mouse over the &lt;BR /&gt;
block, a dotted outline appears, but the block does not remain visible until &lt;BR /&gt;
I pan.&lt;BR /&gt;
&lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936836@discussion.autodesk.com...&lt;BR /&gt;
There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not&lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but&lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
                                                                        db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish this from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Wed, 24 Aug 2005 00:22:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413389#M84053</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-24T00:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413390#M84054</link>
      <description>Since you're doing this in a modal command handler,&lt;BR /&gt;
there should be no problem like this.&lt;BR /&gt;
&lt;BR /&gt;
You're not showing the whole picture, so can you&lt;BR /&gt;
confirm that the code that creates the new entities &lt;BR /&gt;
calsl AddNewlyCreatedDBObject() ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message news:4936876@discussion.autodesk.com...&lt;BR /&gt;
Thanks very much for your help so far, but FlushGraphics doesn't seem to be &lt;BR /&gt;
doing the trick.  Am I calling it incorrectly?  My code is attached in a &lt;BR /&gt;
text file.&lt;BR /&gt;
&lt;BR /&gt;
I've noticed that the PAN command seems to be the only thing that will make &lt;BR /&gt;
things work (as opposed to what I thought earlier).  If I insert the blocks &lt;BR /&gt;
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that &lt;BR /&gt;
was inserted remains invisible until I pan.  If I move my mouse over the &lt;BR /&gt;
block, a do&lt;BR /&gt;
tted outline appears, but the block does not remain visible until &lt;BR /&gt;
I pan.&lt;BR /&gt;
&lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936836@discussion.autodesk.com...&lt;BR /&gt;
There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &amp;lt;&lt;BR /&gt;
carlos at sensametrics dot com&amp;gt; wrote in message &lt;BR /&gt;
news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not&lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but&lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
                                                                    &lt;BR /&gt;
    db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.cadd&lt;BR /&gt;
zone.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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish thi&lt;BR /&gt;
s from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/TONY.TANZILLO&gt;&lt;/CARLOS&gt;</description>
      <pubDate>Wed, 24 Aug 2005 01:50:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413390#M84054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-24T01:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413391#M84055</link>
      <description>I'm fairly sure the call to AddNewlyCreatedDBObject is working, but I've &lt;BR /&gt;
attached the code for actually inserting the blocks into AutoCAD just in &lt;BR /&gt;
case.&lt;BR /&gt;
&lt;BR /&gt;
I've tried all sorts of stuff.  Can you see the problem?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Carlos&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936905@discussion.autodesk.com...&lt;BR /&gt;
Since you're doing this in a modal command handler,&lt;BR /&gt;
there should be no problem like this.&lt;BR /&gt;
&lt;BR /&gt;
You're not showing the whole picture, so can you&lt;BR /&gt;
confirm that the code that creates the new entities&lt;BR /&gt;
calsl AddNewlyCreatedDBObject() ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936876@discussion.autodesk.com...&lt;BR /&gt;
Thanks very much for your help so far, but FlushGraphics doesn't seem to be&lt;BR /&gt;
doing the trick.  Am I calling it incorrectly?  My code is attached in a&lt;BR /&gt;
text file.&lt;BR /&gt;
&lt;BR /&gt;
I've noticed that the PAN command seems to be the only thing that will make&lt;BR /&gt;
things work (as opposed to what I thought earlier).  If I insert the blocks&lt;BR /&gt;
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that&lt;BR /&gt;
was inserted remains invisible until I pan.  If I move my mouse over the&lt;BR /&gt;
block, a do&lt;BR /&gt;
tted outline appears, but the block does not remain visible until&lt;BR /&gt;
I pan.&lt;BR /&gt;
&lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936836@discussion.autodesk.com...&lt;BR /&gt;
There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &amp;lt;&lt;BR /&gt;
carlos at sensametrics dot com&amp;gt; wrote in message&lt;BR /&gt;
news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not&lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but&lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
&lt;BR /&gt;
    db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.cadd&lt;BR /&gt;
zone.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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish thi&lt;BR /&gt;
s from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/TONY.TANZILLO&gt;&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Wed, 24 Aug 2005 19:05:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413391#M84055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-24T19:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413392#M84056</link>
      <description>As a side note,&lt;BR /&gt;
&lt;BR /&gt;
I've never had to use the call to db.ReadDwgFile() because the condition &lt;BR /&gt;
(bt.Has("Sensing Unit")) has always been met.  I've had some issues with &lt;BR /&gt;
that call anyway, so that is why it's commented out.&lt;BR /&gt;
&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:4936905@discussion.autodesk.com...&lt;BR /&gt;
Since you're doing this in a modal command handler,&lt;BR /&gt;
there should be no problem like this.&lt;BR /&gt;
&lt;BR /&gt;
You're not showing the whole picture, so can you&lt;BR /&gt;
confirm that the code that creates the new entities&lt;BR /&gt;
calsl AddNewlyCreatedDBObject() ?&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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message &lt;BR /&gt;
news:4936876@discussion.autodesk.com...&lt;BR /&gt;
Thanks very much for your help so far, but FlushGraphics doesn't seem to be&lt;BR /&gt;
doing the trick.  Am I calling it incorrectly?  My code is attached in a&lt;BR /&gt;
text file.&lt;BR /&gt;
&lt;BR /&gt;
I've noticed that the PAN command seems to be the only thing that will make&lt;BR /&gt;
things work (as opposed to what I thought earlier).  If I insert the blocks&lt;BR /&gt;
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that&lt;BR /&gt;
was inserted remains invisible until I pan.  If I move my mouse over the&lt;BR /&gt;
block, a do&lt;BR /&gt;
tted outline appears, but the block does not remain visible until&lt;BR /&gt;
I pan.&lt;BR /&gt;
&lt;BR /&gt;
Any other ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks again.&lt;BR /&gt;
-Carlos&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936836@discussion.autodesk.com...&lt;BR /&gt;
There are two of them:&lt;BR /&gt;
&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.TransactionManager&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager&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;
"Carlos" &amp;lt;&lt;BR /&gt;
carlos at sensametrics dot com&amp;gt; wrote in message&lt;BR /&gt;
news:4936807@discussion.autodesk.com...&lt;BR /&gt;
That sounds like what I want, but for some reason FlushGraphics is not&lt;BR /&gt;
listed as a method of TransactionManager.  I see QueueForGraphicsFlush, but&lt;BR /&gt;
not FlushGraphics.  How is that method used?&lt;BR /&gt;
&lt;BR /&gt;
Here's my code:&lt;BR /&gt;
&lt;BR /&gt;
Database db=Application.DocumentManager.MdiActiveDocument.Database;&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =&lt;BR /&gt;
&lt;BR /&gt;
    db.TransactionManager;&lt;BR /&gt;
Transaction trans = TM.StartTransaction();&lt;BR /&gt;
&lt;BR /&gt;
try&lt;BR /&gt;
{&lt;BR /&gt;
    &amp;lt;&amp;lt;&lt;HERE&gt;&amp;gt;&amp;gt;&lt;BR /&gt;
    trans.Commit();&lt;BR /&gt;
}&lt;BR /&gt;
catch&lt;BR /&gt;
{&lt;BR /&gt;
}&lt;BR /&gt;
finally&lt;BR /&gt;
{&lt;BR /&gt;
   trans.Dispose();&lt;BR /&gt;
   TM.FlushGraphics();  ???&lt;BR /&gt;
   Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message&lt;BR /&gt;
news:4936774@discussion.autodesk.com...&lt;BR /&gt;
Have you tried calling TransactionManager.FlushGraphics ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.cadd&lt;BR /&gt;
zone.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;
"Carlos" &lt;CARLOS at="" sensametrics="" dot="" com=""&gt; wrote in message&lt;BR /&gt;
news:4936528@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a&lt;BR /&gt;
drawing.  It works, but the blocks are initially invisible.  I have to pan&lt;BR /&gt;
or zoom (or do anything, as far as I know) for them to appear.&lt;BR /&gt;
&lt;BR /&gt;
I'd like to try calling the Zoom command with a scale of 1x.  How do I&lt;BR /&gt;
accomplish thi&lt;BR /&gt;
s from .NET?&lt;BR /&gt;
&lt;BR /&gt;
Thanks so much for any help.&lt;BR /&gt;
-Carlos&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;&lt;/HERE&gt;&lt;/TONY.TANZILLO&gt;&lt;/CARLOS&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Wed, 24 Aug 2005 19:16:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413392#M84056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-08-24T19:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: What's the best way to refresh the drawing after adding blocks?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413393#M84057</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Did you already try to use this:&lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.UpdateScreen();&lt;BR /&gt;
			&lt;BR /&gt;
Pedro Henrique Liberato, sorry the 'little' delay and the poor English &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 18 Nov 2005 03:19:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-the-best-way-to-refresh-the-drawing-after-adding-blocks/m-p/1413393#M84057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-18T03:19:00Z</dc:date>
    </item>
  </channel>
</rss>

