This should show you a way.
* Found here http://www.autocad.ru/cgi-bin/f1/board.cgi?t=26588Fa
* Posted by: detox
* Date: 7/31/2006
[CommandMethod("GetLayoutNames")]
static public void GetLayoutNames()
{
ED ed = App.DocumentManager.MdiActiveDocument.Editor;
Database db = HostApplicationServices.WorkingDatabase;
Transaction trans = db.TransactionManager.StartTransaction();
try
{
DBDictionary layoutDict =
(DBDictionary)trans.GetObject(db.LayoutDictionaryId, OpenMode.ForRead);
Int32 iLayout = 0;
foreach (DictionaryEntry id in layoutDict)
{
Layout ltr = (Layout) trans.GetObject((ObjectId)id.Value,
OpenMode.ForRead);
ed.WriteMessage("\nLayout N{0} = {1}", ++iLayout, ltr.LayoutName);
}
trans.Commit();
}
finally
{
trans.Dispose();
}
}
--
Tim
"A blind man lets nothing block his vision."
wrote in message news:5744558@discussion.autodesk.com...
How can I loop through every Layout in
DatabaseServices.LayoutManager.Current
Or any way really. I need to loop through every layout of a drawing, change
some PlotSettings.
Thanks in advanced