I set up a tool for handling files in Insight environment.
Moving to various paths is no problem, but I have to fill out some user-defined attributes.
Therefore I use SolidEdgeFileProperties.PropertySets as the Revisionmanager.PropertySets doesnot work.
Now, the writing is no problem, but the releasing of the resources.
As long as my program is running, if I select few files (below 10) , the files are write-protected. If I end the program, the write-protection is deregulated immediately.
If I have selected a lot of files, only the last 5 to 10 files are write-protected (and the last 5 will keep the writeprotection as long as the program is running.
I have added the code below.
How can I free the files immediately without terminating the program.
By the way, I have the feeling, that the SolidEdgeFileProperties are not harmonized with Insight.
objPropertySets = New SolidEdgeFileProperties.PropertySets
' Open a file
objProperties = objPropertySets.Item("Custom")
For j = 0 To objProperties.Count - 1
If objProperties.Item(j).Name = "N_Freigabedatum" Then
N_Freigabedatum_exists = True
If N_Freigabedatum_exists Then
objProperties.Item("N_Freigabedatum").Value = m_Freigabedatum
Catch ex As Exception
If Not (objProperties Is Nothing) Then
objProperties = Nothing
If Not (objPropertySets Is Nothing) Then
'Close underlying property storage
objPropertySets = Nothing
Posted by: Andreas BaumannPost date: 12/28/2012 9:33:17 AM
I found the answer for my problem in this article:
My problem was also of this IDLE-Issues and the GC.collect()-command solved my problem completely.
Posted by: Andreas BaumannPost date: 12/29/2012 6:03:06 AM