Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

using catalog browser with vba

Status
Not open for further replies.

Kikoupe

Mechanical
Jul 7, 2021
17
FR
Hi guys i would like to do this with the vba on catia :

1 : open the catalogue browser that is ok => CATIA.StartCommand ("Catalog Browser")
2 : set the current lib as I want => I don't know how to set this...
3 : set the filter with a input value with a inputbox
4 : Search it
5 : select the part (only one available)
6 : copy and past it in a current catproduct

I have a major issue that when I start the command I can't make a sendkeys because the Catalog Browser is not activate windows...

Do you have some solution ?
Here is my little code...


Code:
Sub CATMain()

CATIA.ActiveWindow.Activate

Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument

Dim selection1 As Selection
Set selection1 = productDocument1.Selection

CATIA.StartCommand ("Catalog Browser")

SendKeys ("a")

End Sub
Thx for your help guys !
 
Replies continue below

Recommended for you

Although it is possible to do with WinAPI and out-of-process VBA or .NET, it is a terrible idea since you have to code a lot of non-obvious stuff to get CATIA windows working.

The only viable solution is to use CAA.
 
@ferdo

Yeah ! Actually I think about it but my main issue is activate an other window and back to Catia window.
If we can do that, it's better.
I have my "Catalog" on VPM so it's Firefox/Mozilla running window and Catia window who have to work together. Do you know how to do that ?

@Little Cthulhu
I'm sorry but i'm a noob in vba and script. What is CAA ?
 
@ferdo
Sry about the lack :(
I'm working on the Catia V5 with VPM 3.0

@Little Cthulhu
With C++ we could do it ?
 
VPM 3.0? What release are you on?

CAA requires it's own license which is not cheap at all.
 
Hi guys,

Sorry for the delay...
I always looking for a tips to load part under a product using the catalog browser... Can we do that without macro ? Maybe with a list ?
I'm actually on DMA and they call it DMA 3.2... I don"t know more...

Thanks for your help !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top