I cannot use the latest ApprenticeServer

I cannot use the latest ApprenticeServer

HideoYamada
Advisor Advisor
1,435 Views
7 Replies
Message 1 of 8

I cannot use the latest ApprenticeServer

HideoYamada
Advisor
Advisor

Hello,

 

Inventor 2018 and 2019 are installed on my PC.

I maked some standalone application, which was using ApprenticeServer.

The application always use the ApprenticeServer 2018.

Why my app cannot call 2019?

It seems that version of the ApprenticeServer is statically fixed to 2018.

 

I did following things...

 

1) Change the interop version to 2019.

sono1.jpg

2) Target framework was changed to .NET Framework 4.7..2.

 

3) run "C:\Program Files\Autodesk\Inventor 2019\Bin\ApprenticeRegSvr.exe" .

 

4) I maked small program which is cheking version of the ApprenticeServer and Inventor.

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            //
            Inventor.ApprenticeServer apprenticeServer;
            apprenticeServer = new ApprenticeServerComponent();
            richTextBox1.Text = "ApprenticeServer : " + apprenticeServer.SoftwareVersion.DisplayName + System.Environment.NewLine;

            //
            Inventor.Application inventorApp;
            inventorApp = (Inventor.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Inventor.Application"));
            richTextBox1.Text += "Inventor : " + inventorApp.SoftwareVersion.DisplayName;
            inventorApp.Quit();
            System.Runtime.InteropServices.Marshal.ReleaseComObject(inventorApp);
        }
    }

Result is...

sono2.JPG

 

5) I Prepared a new PC and InventorView2019 was installed.

My tool failed to initialize ApprenticeServerComponent.

After installing InventorView2018, the tool worked fine.

 

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Accepted solutions (1)
1,436 Views
7 Replies
Replies (7)
Message 2 of 8

HideoYamada
Advisor
Advisor
0 Likes
Message 3 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@HideoYamada,

 

I do had same issue with version of Apprentice server. After installing Inventor View 2019 from below link.

 

https://knowledge.autodesk.com/support/inventor-products/downloads/caas/downloads/content/autodesk-i...

 

Now, it is showing correct version of Apprentice server (2019.1).

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 8

HideoYamada
Advisor
Advisor

Hello Chandra,

 

I re-installed Inventor View 2019, but the problem was not solved.

 

I did some new tests on other PC.

No Inventor or Inventor View was installed on that PC.

 

1) First, I installed Inventor View 2017.

My app said that ApprenticeServer version was 2017.

 

2) I installed Inventor View 2018 additionally.

My app said that ApprenticeServer version was 2018.

 

3) Finally, Inventor View 2019 was installed.

The version of ApprenticeServer was still 2018 by my app.

 

My app fails to find 2019 library. Why?

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Message 5 of 8

HideoYamada
Advisor
Advisor

I run following codes on Microsoft Excel VBA.

 

Sub test()
    Dim InvApp As ApprenticeServerComponent
    
    Set InvApp = New ApprenticeServerComponent
    
    MsgBox InvApp.SoftwareVersion.DisplayName
End Sub

Displayed version is 2018.

So Ithis problem seems to be not depending on my app.

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Message 6 of 8

HideoYamada
Advisor
Advisor

I used oleview.exe and checked what version of Apprentice Server being regstered.

On the PC which Inventor View 2017, 2018, 2019 was installed, RxApprenticeServer.dll of Inventor View 2018 was used.

 

Next, I run ApprenticeRegSvr.exe in Inventor View 2017, and registration was changed to 2017. Okay.

 

Finally, I run ApprenticeRegSvr.exe in Inventor View 2019, but registration was still 2017 version.

 

I found small difference between 2019 and the older versions.

2017 and 2018 has two RxApprenticeServer.dlls in following path.

C:\Program Files\Autodesk\Inventor View 2017(or 2018)\Bin\RxApprenticeServer.dll
C:\Program Files\Autodesk\Inventor View 2017(or 2018)\Bin32\RxApprenticeServer.dll

The path viewed by oleview.exe is the latter.

Inventor View 2019 has only one dll at the former path.

 

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp
0 Likes
Message 7 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@HideoYamada,

 

Hoping that solution in below forum discussion link would help.

 

https://forums.autodesk.com/t5/inventor-customization/apprenticeservercomponent-open-inventor-2019-f...

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 8 of 8

HideoYamada
Advisor
Advisor

Hello Chandra,

 

I recompiled my tool as a x64 application and now it works fine with 2019.

Thank you!!

=====
Freeradical
 Hideo Yamada
https://www.freeradical.jp