First, use the Document's TransactionManager, not the
Database's TransactionManager.
See if this works:
{code}
Document doc = ....
using( Transaction tr = doc.TransactionManager.StartTransaction () )
{
Line line = ....// assign to line to hide
using( Transaction inner = doc.TransactionManager.StartTransaction() )
{
line.Visible = false;
inner.Commit();
}
// jig here....
line.Visible = true;
tr.Commit();
}
{code}
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6368695@discussion.autodesk.com...
Sometimes it's too easy. I was looking for something similar but searched for
Hide/Unhide, Visible never occur'd to me.
But now I have a new question, look in the code below (it's not complete, I
know), how can I make it invisible before calling the jig? If I use
acTrans.Commit then I can't continue without errors. Do I have start a new
Using?
{code}
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
lin.Visible = False
' call the jig
lin.Visible = True
acTrans.Commit()
End Using
{code}