Kattmandu
Automotive
- Oct 31, 2022
- 7
If the input is not entered with case sensitivity in mind, an error occurs. So if the actual filename is "Some_Random_Part.CATPart" and the user enters "some_random_part.catpart" it throws the error "The method item failed". Is there a way around this?
Code:
Dim strFilename As String
strFilename = InputBox("Enter filename:", strFilename)
Dim partDocument1 As Document
Set partDocument1 = CATIA.Documents.Item(strFilename) <-- error on this line