Hi,
After I failed to implement auto-batch-plotting(printing), I decided to do it semi-automatically.
I am going to open each drawing and change the current layout to paperspace1 and set the plot page settings, and then close and save the document.
So now, my problem is chainging current layout of the opened document and manipulating plot page settings.
Even a little hint or sample code snippet would be very appreciated. 😃
FYI, I am currently using Object ARX 2007 with C#.
Best regards,
Jake
Solved! Go to Solution.
Solved by fieldguy. Go to Solution.
There is plenty of code here for changing layouts. Try keyword search "layoutname".
There is some vb code here http://forums.autodesk.com/t5/NET/Layouts-and-Viewports/td-p/3128748
Awesome~!!
Document doc = Application.DocumentManager.Add("acad"); DocumentLock docLock = doc.LockDocument(); Database db = doc.Database; using (Transaction tr = db.TransactionManager.StartTransaction()) { LayoutManager lm = LayoutManager.Current; Layout layoutObj; DBDictionary layoutDict; using (layoutDict = tr.GetObject(db.LayoutDictionaryId, OpenMode.ForRead) as DBDictionary) { foreach (System.Collections.DictionaryEntry de in layoutDict) { using (layoutObj = tr.GetObject((ObjectId)(de.Value), OpenMode.ForRead) as Layout) { lm.CurrentLayout = layoutObj.LayoutName; } } } tr.Commit(); }
One down!!
Now, I need to figure out how to change the page setup programmatically, so I can batch print multiple drawings at once!!!
Glad you found it. IMO Kean Walmsley has the best examples for plotting - this is 1 of them
http://through-the-interface.typepad.com/through_the_interface/2007/10/previewing-an-1.html
Search plotting at that site for others - they are c# for the most part.