We are getting closer to something that works and that is simple enough that people will actually use it. So I took your most recent bit of code here, added a little from your first bit and some code from another script we use and it looks like this:
oDesigner = InputBox("Enter Designer Name", "Designer")
oPath = ThisDoc.Path
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
Dim oExportCount As Integer
oExportCount = 0
' Folder Location
Dim oDialog As New FolderBrowserDialog
oDialog.Description = "Select directory to update"
oDialog.RootFolder = System.Environment.SpecialFolder.MyComputer
oDialog.SelectedPath = oPath
Dim oRes As DialogResult = oDialog.ShowDialog()
If oRes = DialogResult.OK Then
oFolder = oDialog.SelectedPath
Else
MessageBox.Show("No folder selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End If
For Each oFile In oFolder 'FileLocation.GetFiles()
Dim oDoc As Document
oDoc = ThisApplication.Documents.Open(oFile.FullName, False)
oDoc.PropertySets.Item(3).Item("Designer").Value = oDesigner
oDoc.Save
oDoc.Close
Next
So this code asks the engineer to input their name, then it asks for the directory of parts to update. Those two parts work well, but I get an error on line 26:
"Error on line 26 in rule: test, in document: x.iam
Public member 'FullName' on type 'Char' not found."
line 26 is :
oDoc = ThisApplication.Documents.Open(oFile.FullName, False)
I do not know enough about coding to know how to troubleshoot this