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
Solved! Go to Solution.
Solved by YuhanZhang. Go to Solution.
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.
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 !
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.
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 !
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?
Actual path I returned from an error capture
"W:\Current Projects\3988 HRM Commmand Post\Drawings\Electrical\00022593-3988.idw"
@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
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 !
@bradeneuropeArthurwrote:
use the IP address instead of the server name
It is doing the same thing on local files. Even files located on desktop.
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 !
Some more details... Error while trying to access a local file (same error for any location).
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...
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 !
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...
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 !
@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.
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...
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 !
@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
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:
We should update the tool for next build.
Can't find what you're looking for? Ask the community or share your knowledge.