Running .dll CommandMethods in accoreconsole

Running .dll CommandMethods in accoreconsole

ngnguyen89LYX
Observer Observer
661 Views
5 Replies
Message 1 of 6

Running .dll CommandMethods in accoreconsole

ngnguyen89LYX
Observer
Observer

Hi AutoDesk Team,

I'm trying to use accoreconsole.exe to 'netload' a .dll file and run a CommandMethod.
The CommandMethod in C# .NET is just a Console.WriteLine().
But my accoreconsole.exe just crashes and exists after running the CommandMethod.


It works when I open up AutoCAD Architecture, run the netload command to import the .dll file and run the CommandMethod. Just not in the accoreconsole.exe.


Is there a way I can make this work for accoreconsole.exe as well?

0 Likes
662 Views
5 Replies
Replies (5)
Message 2 of 6

_gile
Consultant
Consultant

Hi,

To be able to run .NEt custom commands in the accoreconsole, the commands have to be created only referncing AcDbMgd.dll and AcCoreMgd.dll, not Acmgd.dll. See this topic (specifically APIs Limitations).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 6

ngnguyen89LYX
Observer
Observer

Thank you for the information and documentation link, @_gile !

 

In my .NET custom command, if I wanted to run Factory Design API,

Factory Design Utilities 2025 Help | Factory Design API | Autodesk

 

I'd need to get instances of Autodesk.AutoCAD.ApplicationServices.Document (for the layout parameter) to run commands from Autodesk.Factory.PublicAPI.API like AddAssetInstances, UpdateAssetInstances, DeleteAssetInstances.

 

From my understanding, not being able to refer to Acmgd.dll will prevent me from creating these instances and using these APIs. Does that mean I wont be able to use the above linked Factory Design API via accoreconsole?

 

 

 

0 Likes
Message 4 of 6

_gile
Consultant
Consultant

@ngnguyen89LYX  a écrit :

From my understanding, not being able to refer to Acmgd.dll will prevent me from creating these instances and using these APIs. Does that mean I wont be able to use the above linked Factory Design API via accoreconsole?


I never used Factory Design Utilities, but if it requires AcMgd.dll, you cannot use it via accoreconsole.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 6

ngnguyen89LYX
Observer
Observer

I'd like to use these Factory Design Utilities API via the accoreconsole.exe and want to confirm if this is possible or not. Is that something I should be asking on a different forum? 

0 Likes
Message 6 of 6

moogalm
Autodesk Support
Autodesk Support

Factory API was designed and tested for in-CAD use.  AcCoreConsole was not considered.

0 Likes