Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Start Sketcher Workbench using macro

Status
Not open for further replies.

NaWin55

Mechanical
Joined
Mar 21, 2020
Messages
98
Location
IN
is there any way to start sketcher workbench and let the user to sketch
and when the user exits the sketcher the macro should detect the sketch and create pad or pocket


 
Possible with VBA and system timers. Way easier to let a user draw, select it in CATIA and then push your button "Create from selected".
 
@Little Cthulhu
Thanks for the replay
But i didnt get your answer
what i want is when i click on create button in userform caita should enter sketch bench and user will sketch something when they exit the sketcher the macro should detect the sketch drawn by user and perform some operation on it
 
ok now i can enter sketch workbench using macro
how do i detect the sketch created by the user after exiting the sketcher workbench
 
Use WinAPI function named "SetTimer" and set a callback that would check CATIA's current workbench and specification tree. You have to put some effort and I don't think it's worth the trouble.
 
@Little Cthulhu
Thanks for the replay

i will try
 
I would try to use:

CATIA.StartCommand("sketch")

then put a dialog box waiting, for when the user finishes the sketch.
for finish the sketch, user should pick something in the dialog box to finish the sketch and macro continue.

Tiago Figueiredo
Tooling Engineer

Youtube channel:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top