How to "Explore" a physical product using its name in Catia v6/3Dx with VBA?

48 Views Asked by At

I just started to learn 3Dx and I would like to open a physical part with VBA. I found some code that helps search for the product and then open it but let's assume I know the name of the physical product to be "PRD_MYPRODUCT" Then

(1) how can I open it directly without first searching for it?

(2) how can it explore it instead of open it?

Dim oSearchService As SearchService
Set oSearchService = CATIA.GetSessionService("Search")

Dim oDBSearch As DatabaseSearch
Set oDBSearch = oSearchService.DatabaseSearch

oDBSearch.BaseType = "VPMReference"
oDBSearch.AddEasyCriteria "V_Name", "<model_title>"  

oSearchService.Search

Dim cPLMEntities As PLMEntities
Set cPLMEntities = oDBSearch.Results

Dim oPLMOpenService As PLMOpenService
Set oPLMOpenService = CATIA.GetSessionService("PLMOpenService")

Dim oEditor As Editor
oPLMOpenService.PLMOpen cPLMEntities.Item(1), oEditor
0

There are 0 best solutions below