Inventor 2020 Regression with Entitlement API

Inventor 2020 Regression with Entitlement API

BrianEkins
Mentor Mentor
736 Views
3 Replies
Message 1 of 4

Inventor 2020 Regression with Entitlement API

BrianEkins
Mentor
Mentor

I've run into a but with the entitlement API with Inventor 2020.  The problem happens if my add-in attempts to use the entitlement API before Inventor it doesn't work for Inventor.  Here are two use cases where the problem appears.

 

  1. When the add-in command is executed, it uses the entitlement API to get the user name and ID to use in the entitlement check.  If the user is not logged into A360 then this will return empty strings for these values, which is correct.  My add-in then notifies the user that they need to log in to be able to use the add-in.  When they attempt to log in they get the dialog below.

    serviceUn.png

     

     


    It's a bogus message and is the result of my add-in using the AdWebServices component before Inventor. If the user had attempted to log in before running the add-ins command it would have been successful.

  2. The second example is where I want to check the license validity when the add-in is activated.  In this case, even if the user was previously logged in and Inventor should be automatically logging into A360 when Inventor is started, it's failing to login.  It shows the user name as if the user is logged in but the drop-down is asking the user to log in.  The problem here is that apparently the add-in is being loaded before Inventor does the A360 connection so Inventor's use of the component is failing.

Neither of these workflows was a problem with Inventor 2018 or 2019 so it appears to be a regression with 2020.

 

Attached is an add-in that can be used to reproduce the two cases.  For case 2 I have code to get the user data in the Activate method and also the OnLoaded event to see if waiting for the OnLoaded event would be after Inventor had logged in but both fail.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Accepted solutions (1)
737 Views
3 Replies
Replies (3)
Message 2 of 4

YuhanZhang
Autodesk
Autodesk

Hi Brian,

 

There should be a change from AdWebservice to AdSSO, I am checking with dev about this, and will let you know when I get the solution.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 3 of 4

cmbronder
Alumni
Alumni

Hello @BrianEkins,

Sorry to hear you ran into this problem. Inventor 2020 changed from in-process handling of A360 login to using the "Autodesk Single Sign On Component" that runs out-of-process and handles more than one installed Autodesk product. You can see it listed in your Control Panel->Uninstall Programs.
Thank you for providing a sample Addin that demonstrates the problem! I am using it to debug the issue. The AddinNETFramework.WebServicesWrapper you are using in your example connects to the out-of-process component.

Sorry, but have no resolution yet.

Thank you,
Clare

0 Likes
Message 4 of 4

cmbronder
Alumni
Alumni
Accepted solution

Hello Brian,

The best resolution to the problems you discovered is for you to use the Inventor.Application.Login API. That will trigger the correct WebServices initialization.
The Login API can be invoked before or after you try to use the "entitlement API". Login will display the "Sign in" dialog. After the user signs in, you can retrieve the User Name and Id.
Let me know if you run into any problems with this solution.
Thank you for your patience,

Clare