.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Load DLL in AutoCAD 2024 via Bundle

4 REPLIES 4
Reply
Message 1 of 5
artillis_prado
327 Views, 4 Replies

How to Load DLL in AutoCAD 2024 via Bundle

I'm trying to load a bundle project that I created in Civil 3D into AutoCAD 2024, but I can't manage to do it even when placing it in the ApplicationPlugins folder or via netload. I'll show you my PackageContents so you can see if there's anything wrong. It works in Civil 3D, but in AutoCAD, I'm facing this issue.

	<Components Description="Test Civil 3D 2024">
		<RuntimeRequirements OS="Win64" Platform="AutoCAD|Civil3D" SeriesMin="R24.3" SeriesMax="R24.3"/>
		<ComponentEntry AppName="Plugin Test" Version="0.0.1" ModuleName="./Contents/Civil3D/2024/plugin.Civil3D.dll" PerDocument="True"/>
	</Components>

 

4 REPLIES 4
Message 2 of 5
ed57gmc
in reply to: artillis_prado

Try using:

 

Platform="AutoCAD*|Civil3D"

 

Note the asterisk.

 

After second thought, does it reference C3D libraries? They aren't present when running plain acad.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Message 3 of 5

<RuntimeRequirements> must be an element of each <ComponentEntry>:

 

<Components Description="Test Civil 3D 2024">
   <ComponentEntry AppName="Plugin Test" Version="0.0.1" 
      ModuleName="./Contents/Civil3D/2024/plugin.Civil3D.dll" 
      PerDocument="True">
      <RuntimeRequirements OS="Win64" Platform="AutoCAD*|Civil3D" 
          SeriesMin="R24.3" SeriesMax="R24.3"/>
   </ComponentEntry>
</Components>
Message 4 of 5

Since it even does not work with NETLOAD command, obviously, it is not an issue of loading DLL from bundle. If the project deals with C3D specific objects (e.g. has references to C3D managed assemblies), then the DLL cannot be used with plain AutoCAD.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 5 of 5

You need to separate your app into two components, one that has no dependence on Civil3d, and another that does. You can't load an app that has a dependence on assemblies that are not present in plain vanilla AutoCAD, unless you are highly-experienced and know how to avoid triggering the loading of the Civil3d-dependent assemblies (yes, it is possible, but also extremely complicated).

 

Because referenced assemblies do not get loaded until something in them is actually used or referenced, you can structure your code to avoid allowing methods that reference Civil3d types from being jitted in plain AutoCAD. I've used those same tactics to prevent AutoCAD managed assemblies from loading into the Visual Studio process in design mode, and it's a fairly-complicated process.

 

You can see how it's done in the refactored BlockView.NET sample app that was originally written by Fenton Webb

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report