.NET

Reply
Distinguished Contributor
Colin French
Posts: 301
Registered: ‎02-18-2004
Message 1 of 3 (81 Views)

Sharing DLL with ACAD and Standalone exe?

81 Views, 2 Replies
02-27-2007 05:34 AM
I want to create a DLL which will be both NetLoad’ed into AutoCAD and used by a standalone executable. Not knowing the plumbing under VS2005, nor what Autodesk’s wizard actually does behind the scenes when setting up a managed code project, are there any little traps waiting for me? Any situations or problems that could crop up when trying to use the same DLL in the two different ways?

Thanks in advance for any help.
*Tony Tanzillo
Message 2 of 3 (81 Views)

Re: Sharing DLL with ACAD and Standalone exe?

02-27-2007 02:07 PM in reply to: Colin French
The main thing you must do is to ensure that the
assembly that you want to use in other processes,
does not reference or have any dependence on the
AutoCAD managed assemblies (e.g., acmgd.dll and
acdbmgd.dll), because these can only be loaded into
AutoCAD's process.


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5501270@discussion.autodesk.com...
I want to create a DLL which will be both NetLoad’ed into AutoCAD and used by a standalone executable. Not knowing the plumbing under VS2005, nor what Autodesk’s wizard actually does behind the scenes when setting up a managed code project, are there any little traps waiting for me? Any situations or problems that could crop up when trying to use the same DLL in the two different ways?

Thanks in advance for any help.
Distinguished Contributor
Colin French
Posts: 301
Registered: ‎02-18-2004
Message 3 of 3 (81 Views)

Re: Sharing DLL with ACAD and Standalone exe?

02-28-2007 08:44 AM in reply to: Colin French
Thanks for the reply -- whatever is loading the DLL (a routine within ACAD or the standalone app) will be responsible for setting a flag property that indicates what environment it is running in. That in turn is used by the DLL when needed to enable/disable some of the U.I. and related functionality, and thereby ignores any of its methods that might require referencing ACAD's assemblies. Heh, sounds like it should work ;-) time for some tests...
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.