Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ApprenticeServerComponent.open, Inventor 2019 files and windows accounts

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
sellis
6132 Views, 23 Replies

ApprenticeServerComponent.open, Inventor 2019 files and windows accounts

We have run into a problem with 2019 files and a VB.net excel addin (windows 10). It works with 2018 idw files but errors on Inventor.ApprenticeServerComponent.Open when opening a 2019 idw.

 

Dim oApprentice As New Inventor.ApprenticeServerComponent
Dim oApprenticeDrawingDoc As Inventor.ApprenticeServerDrawingDocument = oApprentice.Open(FilePath)

If I log into a computer as network administrator it works fine. Does not work with A user with administrator rights.

 

I have disabled UAC in the registry with no luck. Could be something funky with our network...

 

Any suggestions?

 

Thanks

Stan

 

23 REPLIES 23
Message 2 of 24
AlexFielder
in reply to: sellis

Hi @sellis,

 

Have all the files referenced by the drawing been migrated to 2019? IIRC failure to do so used to cause the Apprenticeserver to not play nicely.

 

Scratch that, I didn't read your initial thread properly; sounds like network authentication issues. 

 

Regards and Thanks,

 

Alex.

Message 3 of 24

Can you copy the complete filepath you use?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 4 of 24
sellis
in reply to: bradeneuropeArthur

I have tried multiple files from different locations... desktop, local drive, mapped drive... file names look like 12345678.idw or 12345678-1234.idw

 

2018 file works with my addin. If I open it in 2019 and save it no longer works unless you login as administrator.

Message 5 of 24
bradeneuropeArthur
in reply to: sellis

I need the following:

"Dim oApprentice As New Inventor.ApprenticeServerComponent Dim oApprenticeDrawingDoc As Inventor.ApprenticeServerDrawingDocument = oApprentice.Open(FilePath)"

 

The complete path from your input....

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 6 of 24
AlexFielder
in reply to: sellis

Some questions for you then:

 

Do 2018 files work from those locations?

Do 2018 files work from those locations with different users?

 

Do 2019 files work from any locations?

Message 7 of 24
sellis
in reply to: bradeneuropeArthur

Actual path I returned from an error capture

"W:\Current Projects\3988 HRM Commmand Post\Drawings\Electrical\00022593-3988.idw"

 

 

Message 8 of 24
sellis
in reply to: AlexFielder


@AlexFielderwrote:

Some questions for you then:

 

Do 2018 files work from those locations?

Do 2018 files work from those locations with different users?

 

Do 2019 files work from any locations?


2018 files work from all locations with all users

2019 files do not work from any location for any user except administrator

2019 files work from all locations with administrator

Message 9 of 24
bradeneuropeArthur
in reply to: sellis

use the IP address instead of the server name

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 10 of 24
sellis
in reply to: bradeneuropeArthur


@bradeneuropeArthurwrote:
use the IP address instead of the server name

It is doing the same thing on local files. Even files located on desktop.

Message 11 of 24
bradeneuropeArthur
in reply to: sellis

Have you set the correct inventor 2019 reference in your project from the add in?
Has inventor 2019 registered correctly?
If not. Open inventor 2019 as administrator and try again.

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 12 of 24
sellis
in reply to: sellis

Some more details... Error while trying to access a local file (same error for any location).

SnipImage (002).jpg

IDW files work until saved in 2019

Seems that some part needed to read 2019 files needs administrator rights.

 

I just found that trying to remove the reference to Autodesk Inventor's Apprentice Object Library crashes VS2017. Think I will start a new VS project and copy my code over and start new. This addin is old and has just been updated over the years. Maybe it has developed some issues... 

Message 13 of 24
bradeneuropeArthur
in reply to: sellis

Yes try that with new references. I am curious...

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 14 of 24
sellis
in reply to: bradeneuropeArthur

Started a new VS2017 project, created all classes and copied in code. Still will not work with 2019 files on a computer not logged in as network administrator... 

 

At this point I am going to create a simple vs project and see if I can gather some more data. It works on my computer but I have all UAC and security software disabled except Window Defender. Other computers have ESET on them so that is another possibility. I will be back when I have more... 

Message 15 of 24
bradeneuropeArthur
in reply to: sellis

can you take if the filetypes are always shown.
Hide filetypes for known filetypes should not be checked.
maybe this it the issue between the users.
I have seen issues or errors because of this setting changed in windows 10

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 16 of 24
sellis
in reply to: bradeneuropeArthur


@bradeneuropeArthurwrote:
can you take if the filetypes are always shown.
Hide filetypes for known filetypes should not be checked.
maybe this it the issue between the users.
I have seen issues or errors because of this setting changed in windows 10

Tried file type always shown, no luck

 

Made a stripped down exe and interestingly it fails on all computers while the full addin works on mine.

 

Ran "C:\Users\Public\Documents\Autodesk\Inventor 2019\SDK\DeveloperTools\Samples\VB.NET\Standalone Applications\ApprenticeServer\Properties\bin\Properties.exe" and it fails on 2019 files only.

error.jpg

 

 

Message 17 of 24
sellis
in reply to: sellis

So I installed Inventor Viewer on my home computer and run my stripped down exe. Same error, reads 2018 and not 2019 files. This eliminates any odd security issues with our network. I am going to try compiling it on another computer and see if that changes anything. Running out of possible causes...

Message 18 of 24
bradeneuropeArthur
in reply to: sellis

what framework version are you using:

.NET Framework:
.NET Framework Version 4.7 or later.

Is recommended for 2019 of inventor.

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Message 19 of 24
sellis
in reply to: bradeneuropeArthur


@bradeneuropeArthurwrote:

what framework version are you using:

.NET Framework:
.NET Framework Version 4.7 or later.

Is recommended for 2019 of inventor.


I didn't realize I wasn't using the latest framework but made no difference when I tried 4.7.2.

 

I also compiled and ran my sample on my home computer and still will not work on 2019 files.

 

This is my VB.net test code. Just needs a form with text boxes named FileNameTextBox and TitleTextBox and a button named TestButton . Here is a link to the test exe ApprenticeServerWindowsApp.exe

 I am hoping someone can test this... I am officially out of ideas.

Imports Inventor
Public Class Form1

    Private Sub TestButton_Click(sender As Object, e As EventArgs) Handles TestButton.Click
        Dim OpenFileDialog As New OpenFileDialog With {
            .Filter = "(Inventor drawing)|*.idw"
        }
        If OpenFileDialog.ShowDialog() = DialogResult.OK Then
            Dim strm As System.IO.Stream = OpenFileDialog.OpenFile()
            Dim FilePath As String = OpenFileDialog.FileName.ToString()
            FileNameTextBox.Text = FilePath
            Try
                Dim oApprentice As New Inventor.ApprenticeServerComponent
                Dim oApprenticeDrawingDoc As Inventor.ApprenticeServerDrawingDocument = oApprentice.Open(FilePath)

                ' Obtain the PropertySets collection
                Dim oPropsets As PropertySets = oApprenticeDrawingDoc.PropertySets
                Dim oPropSet As PropertySet = oPropsets.Item("Design Tracking Properties")
                oPropSet = oPropsets.Item("Summary Information")
                Dim Title As String = oPropSet.Item("Title").Value
                TitleTextBox.Text = Title
                oApprenticeDrawingDoc.Close()
            Catch ex2 As Exception
                MsgBox(FilePath & " - " & ex2.ToString)
            End Try
        End If
    End Sub

End Class
Message 20 of 24
YuhanZhang
in reply to: sellis

I can reproduce the problem with the tool, and I find the problem should be that the Inventor 2019 removes the support to Apprentice x86 bit, and so the tool needs to be recompiled to support the x64 version only, so you can open the VB project, and in the Properties of the project, change the Target CPU in the Compile tab to x64 like below, or AnyCPU but make sure to uncheck the Prefer 32-bit option, then recompile it and check if it works:

 

Properties.png

 

We should update the tool for next build.



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.

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

Post to forums  

Autodesk Design & Make Report