I'm attempting to create a .NET addin running in AcCoreConsole.exe. In this project I've removed the reference to AcMgd.dll and replaced it with AcCoreMgd.dll. Is it correct that i cannot use the AcMgd.dll if I am to run my .NET addin from within AcCoreConsole.exe?
If so, how do access the DocumentManager?
DocumentCollection ^acDocMgr = Autodesk::AutoCAD::ApplicationServices::Applicatio
gives the error:
error C2039: 'DocumentManager' : is not a member of 'Autodesk::AutoCAD::ApplicationServices'
Is there a replacement in the AcCoreMgd.dll for the DocumentManager?
Bjørn Egil Jenssen
And yes, you cannot include reference to AcMgd.dll if you plan to run the addin on AutoCAD Console.
Thanks, that did the trick
But what about extension methods?
Document ^acDoc = DocumentCollectionExtension::Add(acDocMgr, strTemplatePath);
How would I go about replacing the functionality of these two methods using only AcCoreMgd?
Some commands will not apply to the console...
Ideally, you should open one console for each document passing the file you want to process. The main reason for that is to avoid memory fragmentation and process on hold.
I see. In my application I need to create new files (not open existing ones), and fill them with geometry. I've now been able to compile and run my application with all its functionality, except creating new files.
Is there any workaround to create a new DWG file from a template file using the AcCoreConsole.exe? Either through .NET code, or by using console commands?
I would say that you can start the console, draw what you need with a .NET custom command, then call AutoCAD built-in SAVE command passing the file path.
Do you think that can work?
This works, however, my application needs to create several DWG's in one "go". So after calling the SAVE command, I need to create a new file, or close the recently saved file, on order to continue on to the next.
It would be possible to close the entire console and restart it to continue where I left of, but it would be more elegant if I could create mutiple files in one go.
I've tried the NEW command in the console, but it doesnt seem to do anything.
Are there any ways to either close the "active" file, or create a new file from the AcCoreConsole.exe?
Note that opening many drawings on the same session will cause memory fragmentation, and use one session for each drawing is one of the great advantages of the console.
That said, one you launch the console passing one file and one script, you can only get the result, and you're not able to interact with it on the fly....
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.