
SName=InputBox("Please enter a name for the assembly", "input", "name") Set oRootChildren = oRootProduct.Products

'Retrieve the product's collection under the root product.

'Select the root document with the Product type Current code for adding the structure to the root product: Language="VBSCRIPT" I seem to not be able to define it as a collection and thus the script does not want to run anymore. When I try to replace the part that concerns the root with all kinds of definitions of Dim oSel As Product

I have managed to add it to the root of the current document, but I cannot get it to add the product to the selected item. Create 4 products as children of the new A_ name product called B_ name, C_ name, etc. Create a new Product as a child of the selected product with A_ name Then run a Macro that does the following, irrelevant of the name, level, of the selected product so the script can be used in different assemblies and it should not matter if it is the root or the child of a child of a child: You don't want to miss out on this great skill you can add to your resume to set you apart from other CATIA designers.Ī: That's not a question! Contact me and I'll answer your question as best as I can.I have been puzzling with CATscript for CATIA v5 and I am trying to do the following:īefore I would like to run the Macro, I would like to Select a Product out of a tree with 100's of products. The material will be right here waiting for you after you complete your urgent project. Check it out here and learn how to setup your CATScript library.Ī: You'll have lifetime access to my lessons, so they will always be available. If you get busy in the middle of the course, that’s OK. Q: Can I see one of the videos included in the All-in Package?Ī: Yes. Plus, when you buy the digital version you can start learning immediately, no waiting required! Q: Is the book also available in paperback?Ī: Yes, you can purchase a paperback version from, but I recommend buying directly from my site because you will receive instant notification and updates whenever I release a new edition of the book, which is not possible if you buy the paperback version.

Read more of my thoughts and see an example CATIA V6 macro. Q: Are CATIA V5 Macro programming skills going to be applicable in CATIA V6?Ī: Yes! And learning how to program in CATIA will also enable you how to program macros in Excel, Word, PowerPoint, and more.
