Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've trying to use accoreconsole.exe to process a batch of files. According to Kean's blog(https://www.keanw.com/2012/02/the-autocad-2013-core-console.html), coreconsole can also load CRX modules and .NET DLLs that have been coded against the new AcCoreMgd.dll (rather than AcMgd.dll). In my code I only used AcDbMgd.dll and AcCoreMgd.dll as references. However, When I tried to load my dll in coreconsole, it showed that "can't load *** assembly".
My accoreconsole.exe version is 2021. And my code structure is as below:
[CommandMethod("TEST", CommandFlags.Session)]
public void TestCode()
{
Document acDoc = AcadCore.Application.DocumentManager.CurrentDocument;
Database acDb = acDoc.Database;
using (DocumentLock acLock = acDoc.LockDocument())
{
using (Transaction acTrans = acDb.TransactionManager.StartTransaction())
{
// Logic code
acTrans.Commit();
}
}
acDb.SaveAs(acDoc.Name, true, DwgVersion.Current, acDb.SecurityParameters);
}
Could someone tell me why this is happening? Thanks a lot.
Solved! Go to Solution.