SimplifiedLogic / creoson

OpenSource Automation using JSON Transactions for PTC's CREO Parametric
http://www.creoson.com
MIT License
81 stars 23 forks source link

get active tab of creo #31

Closed dmtr99 closed 4 years ago

dmtr99 commented 4 years ago

Is it possible to get the name of the active tab (sketch, extrude, revolve, model, Analysis,...)?

I have build a lot of contentsensitive menus and hotkeys, so depending on the file,(drawing, part or assembly) a different menu and hotkeys are availible (in a drawing it is usefull to start creating dimensions, in a part the same action is not usefull.

In a sketch tab, there are a few different actions you want to perform: create line, circle, dimension, mirror, in a extrude tab, the action "edit sketch" would be handy. Currently I use a Imagesearch to detect the sketch tab, but this is not fast and could pose problems when distributing the menus along colleagues.

Maybe "creo : get_active_tab"?

adama2000 commented 4 years ago

It doesn't look like the API supports that. It has functions for creating commands and modifying the ribbon but not for detecting the current tab on the ribbon.

Unless someone else has a suggestion?