Open btxp opened 3 years ago
It should be possible to do all these actions with mapkeys
@btxp you probably solved this already, but I have workflow for extracting mapkeys that can be very handy in your situation. It's worth mentioning in case someone else come across this.
mapkey a2 @MAPKEY_NAMEDescription;\
mapkey(continued) @MAPKEY_LABELDescription;\
mapkey(continued) ~ Update `main_dlg_cur` `PHTLeft.simple_search_ph.ss_key_input_panel` `*01*`;\
mapkey(continued) ~ Command `ProCmdSimpleSearch`;
I'm using python to edit this text slightly and then get a different result. We built our own python wrapper which I'm using below, but there is a more popular pycreoson library which is well maintained you can also use.
My python script:
from libraries.shared.creoson_connection.CreosonLibrary import CreosonCommands
creo_ = CreosonCommands()
search_criteria = "*02*"
text = f"""
mapkey(continued) ~ Update `main_dlg_cur` `PHTLeft.simple_search_ph.ss_key_input_panel` `{search_criteria}`;\
mapkey(continued) ~ Command `ProCmdSimpleSearch`;
"""
data = {'script' : text}
creo_.mapkey(data)
The result with the new search criteria:
The mapkey functionality can often be used to get around functions that are missing from CREOSON, I use it a lot, you can also use it to nest several features together which is often faster than using many CREOSON functions in sequence.
Hope this helps.
Would it be possible to Add a function to replace part or subassembly and return the new filename? And a function to highlight a part or subassembly in the model tree and the graphics area?