Hi @jordan.bicknellXG55R
If possible I would suggest you to try and put together a pseudo code showing an attempt to implement what your requesting. This will help yourself testing with your own data set and to work out a workflow that works in your situation.
I have put together a brief sample to work with the left 12 characters of the filename without extension. There should be enough information here to try either of your suggested filtering methods. If you need help trouble shooting then attach the code your using and a description of what is and isn't working.
Dim partDoc As PartDocument = ThisDoc.Document
Dim projDir As String = ThisDoc.Path
Dim fileNameWoExt1 As String = ThisDoc.FileName(False)
Dim shortName1 As String = Left(fileNameWoExt1,12)
Dim fileEntries As String() = IO.Directory.GetFiles(projDir, "*.ipt")
Dim foundDoc As PartDocument
For Each fullFileName As String In fileEntries
Dim fileNameWoExt2 As String = IO.Path.GetFileNameWithoutExtension(fullFileName)
Dim shortName2 As String = Left(fileNameWoExt2, 12)
'Check the fullfilename found is not the same as the document your in and that it has the same partial filename
If Not fullFileName = partDoc.FullFileName AndAlso shortName1 = shortName2 Then
Logger.Info(fullFileName)
foundDoc = ThisApplication.Documents.Open(fullFileName,False)
Try
Dim origDescProp As Inventor.Property = partDoc.PropertySets.Item("Design Tracking Properties").Item("Description")
MessageBox.Show(origDescProp.Value, "Title")
Dim foundDescProp As Inventor.Property = foundDoc.PropertySets.Item("Design Tracking Properties").Item("Description")
MessageBox.Show(foundDescProp.Value, "Title")
origDescProp.Value = foundDescProp.Value
Catch ex As Exception
End Try
End If
Next
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan