Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Search results for query: *

  1. Kattmandu

    CATIA.Documents.Item(<string>) seems to be case sensitive

    How do I iterate through documents? I don't understand what that means.
  2. Kattmandu

    CATIA.Documents.Item(<string>) seems to be case sensitive

    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 =...
  3. Kattmandu

    How to check user input for CATPart or CATProduct?

    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...
  4. Kattmandu

    Catia Macro Selection to copy and paste multiple PartBody objects into new CATPart

    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...
  5. Kattmandu

    How to select from currently opened CATParts and CATProducts?

    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...
  6. Kattmandu

    How can I relink broken drawing views to a CATProduct using script?

    @Little Cthulhu, Worked perfect, thanks!
  7. Kattmandu

    How can I relink broken drawing views to a CATProduct using script?

    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...
Back
Top