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?
Dim strFilename As String
strFilename =...
How do I add code to check the user input for .CATPart or .CATProduct?
Dim strFilename As String
strFilename = InputBox("Enter filename with extension", strFilename)
Dim partDocument1 As Document
Set partDocument1 = CATIA.Documents.Item(strFilename)
Dim viewBehavior As...
I found this "Catia Macro Selection" code online and modified it a bit to learn more about CATScripts. The original code assumes that there is only one PartBody in each CATPart. I am trying to modify it so that it will copy multiple PartBody objects in each selected CATPart. The modified code...
Programming is not my expertise. With that said, I'm looking to implement a CATScript that asks the user to select from a list of currently opened CATParts and CATProducts listed under the "Window" pull down menu in CatiaV5. What would code look like to get the "window" items into a selectable...
thread560-356588
I found the VBA script below in the thread linked above which drewmumaw created/posted. How can I rewrite it to work with a CATProduct? It works when I use a CATPart but if I change it to a CATProduct I receive a scripting error (see attachment at bottom).
Sub CATMain()
Dim...