

Select PLM VSTA Projects from Library Type then Create new library…C# or VB.net.VSTA provides a more powerful customization toolset than VBA, CATScript, or VBScript. The VSTA runtime works in both 32-bit and 64-bit client and server environments. NET data access capabilities, where VBA is limited to COM based data access. VSTA provides a development framework and a light version of the Visual Studio Integrated Development Environment (IDE). Visual Studio Tools for Applications (VSTA) New in V6 is VSTA – Visual Studio Tools for Applications.Visual Basic Scripting Edition – VBScript (variant variable).Scripting languages supported in V5 are still supported in V6, including: Supported Scripting Languages in CATIA V6 Any objects whose types derives from Document in V5 should be replaced. V6 macros cannot be saved in representations. You can create a V6 macro for each V5 macro processed. V6 macros are saved and accessed from macro libraries stored in PLM server database. Parts now support multiple representations enabled through isolation between the part reference and its shape. There are new robust query and save operations as well as a unique entity-relation based data model that reduces storage size. In V6, documents and files are replaced with product references and instances. OSelection = of the main changes going from programming macros in CATIA V5 to CATIA V6 is that the data model replaces the document-centric model relying on files with a product/representation model relying on a database and client/server architecture. Print 'Putting %s onto the table'%foundobj.Name

Print 'Found %s entries.'%o3DShapeAsPLMEntities.Count O3DShapeAsPLMEntities = oPLMSearch.EditedContent # Iterate over all found objects and put them into the turntable view OPLMSearch.AddAttributeCriteria("PLM_ExternalID", "Weld0815*")

OSearchService = catiaObj.GetSessionService("PLMSearch") # Search for every Product with name Weld0815* This is very useful, if you want to compare different Products an one turntable view. The next example throws a query (Weld0815*) to the VPM database, gets all relevant products and places all of them on a turntable view of the Silver Layer. Print 'Selected Item %s: %s'%(i, (i + 1).Value.Name) The first example prints the names (PLMExternalID) of all selected entries in a query list of the advanced search (Silver Layer):ĬatiaObj=('CATIA.Application')įor i in range(): When you run the following two scripts, CATIA V6 should be installed and already be running. If you want to use another Python Distribution, you have to install this module manually. The next two examples show two simple programming examples by using Pywin32, which is included in the ActivePython Distribution. You need either the comtypes module or the Pywin32 module.

CATIA V6 can be automated in the same way like CATIA V5.
