Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Call function in external dll in Revit2016R2 doesn't work.

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
pmeigneux
665 Views, 12 Replies

Call function in external dll in Revit2016R2 doesn't work.

Hello,

 

I have an addin that calls a dll (not Revit). This works with Revit 2015 for all update / release, for Revit 2017, Revit 2017.1 and Revit2016 to R2.


But it does not work with Revit 2016 R2 and for the following update.

 

Error: System.AccessViolationException

 

Why ? do you have an idea ?

 

Philippe.

12 REPLIES 12
Message 2 of 13

When those things happen please also post the stack trace.

At least we have an idea of what your dll was trying to do.

Message 3 of 13

Hello,

 

I added a dumpdata.zip file

 

Philippe.

Message 4 of 13

Please check your VS project build first (64 vs 32 bit) maybe this is the problem. If not please clarify more about what you are doing.

 

If this reply satisfies your need please don't forget to mark it as an answer.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Innovation and R&D Lead, AtkinsRéalis

Facebook | Twitter | LinkedIn

Message 5 of 13

Hi,

 

I'm 64 bit

 

s..

Message 6 of 13
pmeigneux
in reply to: pmeigneux

hi,

I'm in 64 bits.

Message 7 of 13

Try to set it to Any CPU and recompile then run.


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Innovation and R&D Lead, AtkinsRéalis

Facebook | Twitter | LinkedIn

Message 8 of 13

Sorry, i test "any CPU" no change..

Message 9 of 13

OK have you tried to debug the code line by line to trace where the exception occurs?


¯\_(ツ)_/¯
Let it work like a charm.

Mustafa Salaheldin


EESignature




Innovation and R&D Lead, AtkinsRéalis

Facebook | Twitter | LinkedIn

Message 10 of 13

Hi,

 

see attachment.

Message 11 of 13
jeremytammik
in reply to: pmeigneux

Dear Philippe,

 

Next step: verify that the call into Lmx.Checkout really works, and then debug into that.

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 12 of 13
pmeigneux
in reply to: jeremytammik

Hi Jeremy,

 

I do not have the code, only a dll.

 

Do you have an idea why the same code works for all revit versions (2015 to 2017) except 2016 R2?

 

Philippe.

Message 13 of 13
jeremytammik
in reply to: pmeigneux

No, sorry, no idea. Incompatible .NET framework? Can you decompile and look at the IL? Can you contact the vendor?



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community