8 Jul, 2019

## Making Use of Catalogs

I posted earlier on creating CATIA trees by passing instructions based on a custom syntax using EKL. I also posted on deploying tools to Catalogs as a mean to distribute automation tools for an organization. Today, I’ll show another example on building a tree, and will cover a few more things on Catalogs that I missed earlier.

This time, the tree will include Drawing and Knowledge Engineering Specifications Representations. Note that Drawing representations created by EKL areShared, which is similar to CATIA’s dotnet APIs. I explained this in my earlier post on understanding drawing representations.

### Quick Recap

Here is the code we’re going to use:

//get the root
let root(VPMReference)
root = GetEditorRoots("VPMReference").GetItem(1)

//add a product under the root
let myProduct(VPMInstance)
myProduct =new("VPMReference", "myProduct", root)

//add a part under the root
let myPart(VPMInstance)
myPart =new("3DPart", "myPart", root)

//add a 3D Shape under the root
let myShape(VPMRepReference)
myShape = new("3DShape" , "myShape" , root)

//create a shared drawing representation using
// object type (Drawing), object name, parent in the tree, standard, sheet size, and orientation.
let myDrawing(VPMRepInstance)
myDrawing = new("Drawing", "myDrawing", root , "ISO","A0 ISO", "Landscape")

//create a Knowledge Engineering Specifications
let myKES(VPMRepInstance)
myKES = new("Knowledgeware", "myKES",  root)


Running The Code
Note that I checked the option to not show a dialog box UI when no arguments (inputs) are required for this Actions. This option removes the need to bring the UI and click “OK” every time we run the Action:

### Catalogs

As mentioned earlier, we can store Features, VPMs and Engineering Templates. in Catalogs. Please note that a Catalog must have at least one Chapter in order for it to store items. Also note that Features can only be Actions, PowerCopies, or User Defined Features. If the intention is to store the other Features including: geometric objects; knowledgeware-features such as Knowledge-Patterns, Checks, Reactions, rules, and Optimization objects; or VBScripts; then we need to add the Representation holding them to the Catalog. This is true for all Representation types: Shape, a Knowledge Engineer Specifications, Skeletons, and Drawings.

### Running Actions From A Catalog

Here are the steps to creating a Catalog and a Chapter, then inserting an Action. The video also shows how to navigate and use the Action through the Catalog Browser tool, and directly from the Catalog .

### Why Catalogs?

Catalogs bring two major benefits:
* They can be recalled and navigated by any members with the correct access credentials; making it very easy to distribute, update, and manage automation solutions.
* Catalogs can be used to store assemblies, Engineering Templates, and overall automation solutions– just like CATIA Favorites list. Unlike Favorites, however, Catalogs can be be exported and shared as 3DXML files.

Tags: , , , ,