Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-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
0
0
BA
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

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.
 
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.
 
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.
Back
Top