I have an add-in which drills down through all the occurances/suboccurances of the active assembly and gathers all the property names and values for a report.
It works fine unless one of the sub-component files is open in another window. If a file is open then a share violation exception is thrown STG_E_SHAREVIOLATION (0x80030020).
I would have expected the read-only = true to allow me to open the property set even though the file is already open elsewhere.
.NET 4.5 and ST8
Here is the pertinent code:
For Each Occurence As SolidEdgeAssembly.Occurrence In parentSE_Occurrences
Private Sub fillProperties(docPath As String)
Dim objPropertySets As SolidEdgeFileProperties.PropertySets = Nothing
objPropertySets = New SolidEdgeFileProperties.PropertySets
objPropertySets.Open(docPath, True) ''Exception thrown here
''grab all the property names & values from all property sets
Catch ex As Exception
Dim a As Integer = 0
If Not (objPropertySets Is Nothing) Then
objPropertySets = Nothing
Solved! Go to Solution.