Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations SDETERS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Little Cthulhu

  1. Little Cthulhu

    Macro to search a part in DESK window of Catia

    I'm going to elaborate on what I meant: 1. Write macro that would search for parts in currently opened assembly and copy them them to a temporary assembly. 2. Run that macro, close your original assembly. 3. Activate temporary assembly, run Desk command. 4. Select ALL parts and run CATDUA. 5...
  2. Little Cthulhu

    Macro to search a part in DESK window of Catia

    AFAIR Desk relationship tree is displayed relative from active document. So if you search for part in original assembly, open it in new window and run Desk command from there it should be easy to find this part as it is going to be located in the very left part of relationship tree. Similar...
  3. Little Cthulhu

    Macro to search a part in DESK window of Catia

    Use Utilities to run CATDUA in batch mode. This way you can exactly specify what documents should be processed.
  4. Little Cthulhu

    How to loop through already opened .CATDrawing files in catia v5 using vba

    Use LWolf's solution as it enumerates "opened" documents meaning the ones that have their own window. Although I'd adjusted "if" condition, because right now it matches ANY documents that have word "Drawing" in them (i.e. "AssemblyForDrawing.CATProduct") Sub CATMain() Dim win, doc...
  5. Little Cthulhu

    Copy bodies from selected part bodies in product

    What a mess. Stop using names to identify products and source bodies, they should be placed to ListViewItem.Tag right after SelectElement. Introduce standalone function CopyBodies(sourceParts as List<of Product>, bodyNames as List<of String>, targetParts as List<of Product>) that would For...
  6. Little Cthulhu

    How to differentiate the product and Component object fro assembly product list. On CATIA V5 , using c#.net API

    Hi. Your question is off the topic, you should start a new thread and post your copy-paste code there.
  7. Little Cthulhu

    How to differentiate the product and Component object fro assembly product list. On CATIA V5 , using c#.net API

    Product differs from component by the way it's stored: one has it's own separate CATProduct document, the other one resides within a document that contains it. So what you want to do is to get to that CATProduct and check if it's root object is the one you've started from. Function...
  8. Little Cthulhu

    CATIA V5 Macro Replace drawing links

    DrawingView.GenerativeBehavior.Document - sets "main" link DrawingView.GenerativeLinks.AddLink/RemoveAllLinks - manages links to subcomponents of "main" linked Product
  9. Little Cthulhu

    Adding a Custom Toolbar as an Add-in in CATIA

    I'm afraid I'm not allowed to share our solution. You have to purchase CAA licens (costs A LOT) and then use sample code in CAA Encyclopedia as a reference to develop your own solution (requires middle-level C++ knowledge).
  10. Little Cthulhu

    Adding a Custom Toolbar as an Add-in in CATIA

    We've got customizable CAA toolbars where each button runs catscript or catvba. I consider this to be the best way to go. A "toolbar" displayed by VB.NET is cumbersome to use since it requires extra action to be displayed and struggles in ergonomics when there're plenty of commands. Consider a...
  11. Little Cthulhu

    Export Clashes as GCR

    Sali, would you please answer how do you do it?
  12. Little Cthulhu

    Macro is running more and more slowly

    Specify CATIA.HSOSynchronized=False Minimize number of times you call Search. Get names of all bodies from Excel, group them by value and call Search for every unique body just once. Moreover, you can add all bodies to Selection, perform a single Search and then group resulting elements by...
  13. Little Cthulhu

    How to get all items linked to a leader?

    Leader's associated object is stored in HeadTarget property. If it's a generated geometry then there's no way to retrieve it with Automation.
  14. Little Cthulhu

    Frame/Titleblock Macro - call image file in same parent folder

    Great job, thanks for sharing. Couple of suggestions: 1. Offset from a setting name to it's value is constant, so you can write it down in your code (this way you'll be able to get any path, not just on C: drive) 2. CATIA strings are null-terminated, so you better search for character with...
  15. Little Cthulhu

    Frame/Titleblock Macro - call image file in same parent folder

    Take a look at the sample code that retrieves language settings: https://www.eng-tips.com/threads/language-setting-info.511721/post-8928554

Part and Inventory Search