- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've come across an issue that I've been unable to resolve in using DirectPlot in ACAD 2016. Let me state that the identical code runs as desired in 2014 & 2015. I've searched for several days for something on this and have found nothing. The error is in defining the layout it returns eNullObjectId. Code below. As stated this same code is error free in 2014 & 2015. I have checked all returns and they are exactly as they should be.
Using acTrans As Transaction = AcDb.TransactionManager.StartTransaction()
Try
Dim acLayoutMgr As LayoutManager = LayoutManager.Current
Dim acLayout As Layout = acTrans.GetObject(acLayoutMgr.GetLayoutId(acLayoutMgr.CurrentLayout), OpenMode.ForRead)
The stack is as such:
ERROR: eNullObjectId
at
Autodesk.AutoCAD.DatabaseServices.TransactionManager.GetObjectInternal(AcDbTransactionManager* pTM, ObjectId id, OpenMode mode, Boolean openErased, Boolean forceOpenOnLockedLayer)
at Autodesk.AutoCAD.DatabaseServices.Transaction.GetObject(ObjectId id, OpenMode mode)
at Forum_2016.SinglePlot.PlotDirect(String DeviceName, String LocMediaName, String CTBName, String plotrotation, String Copies)
Assistance is welcomed gratefully.
Solved! Go to Solution.