Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have around a thousand files I need to change. I update the titleblock and that is working fine. I am trying to delete the Layout called Layout2, but it doesn't work. This is the part of the code I'm using. I don't have the drawing open in the editor because it saves so much time. Does anyone know why it's not doing anything?
public void PTDrawing(Database currentDb, MainForm control, string sheetName, string sheetType, Microsoft.Office.Interop.Excel.Worksheet tbExcel)
{
using (Transaction acTrans = currentDb.TransactionManager.StartTransaction())
{
LayoutManager.Current.DeleteLayout("Layout2");
acTrans.Commit();
}
Solved! Go to Solution.