Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Positioned sketch windows api

Status
Not open for further replies.

catiavbmacro

Automotive
Nov 13, 2018
89
Hello guys,
I tried before to make macro for positioned sketch, but it can't be done with a macro.

I got some new idea, to run macro and start command for positioned sketch. And then to use windows api to navigate through menu.

I never use windows api, so can you give me any hints, some docu or smtgh?
 
Replies continue below

Recommended for you

Sure.

MSDN and Stackoverflow.

As for CATIA - what user actions do you want to automate?
 
Hello,
Inside positioned sketch there are few things user need to select, but it can be done with the one selection of Axis, it's not the problem. It's more problem for me to navigate through the menu.

I tried to search but I didn't have a lot of success, get some posta but not a lot.
 
I don't remember this command having a menu. A window, a toolbar, but not a menu.

What do you mean by "navigate through the menu" exactly?
 
Hello, here a few pic
ps1_mif6dy.png

ps2_fbzum9.png

ps3_zaz5fj.png


So i need to select these from the menu and the give those input from selection.
 
Start with running Spy++ tool and checking if all controls are available as windows.

Then search for "Sketch Positioning" window using it's name with FindWindow function.
After that use FindWindowEx to get child windows.
To select specific item from listbox use SendMessage.

Note that after each call you have to wait for "Sketch Positioning" window to process inputs (and possibly redraw itself adding new controls).

As a side note, I believe this question has little to do with CATIA, and should be discussed on specialized WinAPI forums not here.
 
Thx a lot on those instructions, I ll try to figure it all.
 
Hello again, I made progress with the Spy tool and FindwindwEx thx again for those instructions.

I have one problem, I don't know how to get a plane from selected Axis. For example, I need to make a selection of XY Axis Plane, it's very easy to select nonaxis planes.

Thx a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor