I'm fairly sure the call to AddNewlyCreatedDBObject is working, but I've
attached the code for actually inserting the blocks into AutoCAD just in
case.
I've tried all sorts of stuff. Can you see the problem?
Thanks,
Carlos
"Tony Tanzillo" wrote in message
news:4936905@discussion.autodesk.com...
Since you're doing this in a modal command handler,
there should be no problem like this.
You're not showing the whole picture, so can you
confirm that the code that creates the new entities
calsl AddNewlyCreatedDBObject() ?
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Carlos" wrote in message
news:4936876@discussion.autodesk.com...
Thanks very much for your help so far, but FlushGraphics doesn't seem to be
doing the trick. Am I calling it incorrectly? My code is attached in a
text file.
I've noticed that the PAN command seems to be the only thing that will make
things work (as opposed to what I thought earlier). If I insert the blocks
from C# and then type Redrawall, Regenall, or Zoom 1x, the last block that
was inserted remains invisible until I pan. If I move my mouse over the
block, a do
tted outline appears, but the block does not remain visible until
I pan.
Any other ideas?
Thanks again.
-Carlos
"Tony Tanzillo" wrote in message
news:4936836@discussion.autodesk.com...
There are two of them:
Autodesk.AutoCAD.ApplicationServices.TransactionManager
Autodesk.AutoCAD.DatabaseServices.TransactionManager
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Carlos" <
carlos at sensametrics dot com> wrote in message
news:4936807@discussion.autodesk.com...
That sounds like what I want, but for some reason FlushGraphics is not
listed as a method of TransactionManager. I see QueueForGraphicsFlush, but
not FlushGraphics. How is that method used?
Here's my code:
Database db=Application.DocumentManager.MdiActiveDocument.Database;
Autodesk.AutoCAD.DatabaseServices.TransactionManager TM =
db.TransactionManager;
Transaction trans = TM.StartTransaction();
try
{
<<>>
trans.Commit();
}
catch
{
}
finally
{
trans.Dispose();
TM.FlushGraphics(); ???
Autodesk.AutoCAD.DatabaseServices.TransactionManager.FlushGraphics?
}
"Tony Tanzillo" wrote in message
news:4936774@discussion.autodesk.com...
Have you tried calling TransactionManager.FlushGraphics ?
--
http://www.cadd
zone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
"Carlos" wrote in message
news:4936528@discussion.autodesk.com...
Hi,
I've got some C# code (VS 2003 and AutoCAD 2006) that adds some blocks to a
drawing. It works, but the blocks are initially invisible. I have to pan
or zoom (or do anything, as far as I know) for them to appear.
I'd like to try calling the Zoom command with a scale of 1x. How do I
accomplish thi
s from .NET?
Thanks so much for any help.
-Carlos