How to create an add-in for InventorServer 2025

How to create an add-in for InventorServer 2025

Majjek
Advocate Advocate
127 Views
1 Reply
Message 1 of 2

How to create an add-in for InventorServer 2025

Majjek
Advocate
Advocate

Hello,

 

How can you create an add-in for InventorServer 2025, which is used by Vault Professional Jobserver (which uses Inventor Interoperability)?

I tried using the default Template for creating an Inventor add-in, but it seems that Inventor Interoperability still uses .Net Framework instead .Net Core 8.0.

Then I tried setting it up with .Net Framework 4.8, but it fails to Activate the Add-In.

It's being found by InventorServer when looping through the Add-Ins.

But when I try to activate it, I get this error from Visual Studio:
Exception thrown: 'System.InvalidCastException' in mscorlib.dll
Specified cast is not valid.

 

The Activate Sub is entirely empty and no variables are assigned, so I don't what it's trying to cast and where it fails.

I'm not trying to cast to Inventor.Application for example.

 

When attaching the debugger to VaultInventorServer, I can see it's loading my .dll, but almost directly it will get unloaded again. It doesn't trigger breakpoints in Visual Studio.

0 Likes
128 Views
1 Reply
Reply (1)
Message 2 of 2

Majjek
Advocate
Advocate

Do you recognize it when you spend some time figuring things out, but you can't find what's wrong and then posting it on the forum, just to figure it out yourself right after posting...

 

It seems that the .dll should be marked as ComVisible in the AssemblyInfo.

After that, the add-in is loaded without issues...

 

But I still find it strange that Inventor is built on .Net Core and add-ins have to be .Net Core as well, while add-ins for InventorServer (which uses the Inventor engine) should be written with .Net Framework.

Maybe somebody can shed a light on that?

0 Likes