-
Start CATIA.
-
Create a macro library.
- In the Tools menu, select Macro, and click Macros...
The Macros dialog opens.
- In the Library type list, select PLM VBA projects.
- Click Create new library...
- In the Name field, enter the name you want to assign to the macro library, or keep the default name.
- Click Finish.
- Close the Macro libraries dialog.
- Close in the Macros dialog.
-
In the Tools menu, select to Macro, and click Visual Basic Editor...
The Microsoft Visual Basic window opens.
-
In the Project pane, right-click your created macro library, select
Insert, and click Module.
- Right-click the created module, and click View Code.
- In the right pane, create and run a
Sub CATMain .
The search enables you to find PLM data in the database according to your criteria.
Sub CATMain()
'Retrieve the Search service from CATIA session
Dim searchService As searchService
Set searchService = CATIA.GetSessionService("Search")
. . .
IndexedSearch.Search
End Sub
- Click the macro name, and click
to run the macro.
If data matching the search parameters is found, a window opens to display the search results.
|