how to create shortcuts to delete, hide, show, isolate component in the model tree
Hello
I got following issue that have puzzled me for a long time
---I want to create some shortcut keys to delete, isolate, hide, show components, and so on in the model tree. I have no idea whether these functions need TCL or Python programing in HyperMesh 2017.
--- How adjust the rotation accuracy of angle when use the rotation button ( like up/down/left/right/clockwise/counter clockwise) in the toolbar. The default value seems to be 15 degree. Is it possible to change the rotation angle?
--- Can we reorient the model by orienting the view normal to a selected face, just like some 3D software. For some completed shape 3D model, we may need to view the model with some directions that get inclined angle to the X/Y/Z axis. Then next questions is how to same these view orientation so to can use them again easily.
Thanks a lot
Answers
-
Hi Tony,
I'll try to help with some of the questions.
1. The shortcut keys such as hide, delete, show, etc are available already in HyperWorks 2020 (the new name and interface for the HyperMesh environment). So you can easily select items and type H, for example, to hide an item. If this were done in older versions (eg 2017) TCL would be the scripting, but not quite sure if this can be done. Python is not yet supported in HyperMesh.
3b. Any view can be saved by orienting the model and RIGHT click in the Model Browser and selecting View. A View item will be added to the Model Tree. You can rename it and save it to the database.
I'll see if I can get more info on the other items as well.
0 -
Regarding the second question in HyperMesh interface click O on the keyboard to access the options and in the geometry panel you'll note a rotation angle. Changing this changes the rotation of the ribbon icons:
0 -
Joshua Pennington said:
Hi Tony,
I'll try to help with some of the questions.
1. The shortcut keys such as hide, delete, show, etc are available already in HyperWorks 2020 (the new name and interface for the HyperMesh environment). So you can easily select items and type H, for example, to hide an item. If this were done in older versions (eg 2017) TCL would be the scripting, but not quite sure if this can be done. Python is not yet supported in HyperMesh.
3b. Any view can be saved by orienting the model and RIGHT click in the Model Browser and selecting View. A View item will be added to the Model Tree. You can rename it and save it to the database.
I'll see if I can get more info on the other items as well.
Hi Pennington
Thanks in advance for your help.
I know that HW2020 do what I want. But I like to use HM 2017 better because it make me work more efficiently. So I am looking for a TCL script to achieve these functions like what HW 2020 can do.
Beside, I get another question. In HM2014, it is applicable that corresonding contact pairs will be duplicated accordingly when the two components are duplicated. However it is not applicable from HM 2017 to HM 2020. I feel that this function is quite useful when there are lot of same components which the contacts will be created among. I have no idea it miss since HM2017.
Thanks again
0 -
Hi,
for classical versions prior to HW2020
shortcut key for "References": <but need focus (click) to HM Graphic Area>
https://community.altair.com/community?id=community_question&sys_id=bef655071b05a0d4c4dfdbd9dc4bcbbb
shortcut key for "Make Current" with advanced actions:
https://community.altair.com/community?id=community_question&sys_id=1417147d1b98a8908017dc61ec4bcb53
generally, below script will help. I can add key codes to XML config of browsers but not find out how to bind it. So, a simple tcl script is better than hooking to XML config...
Tested on HM2017 (not HW Desktop)
#@author: tinh #create shortcut key for context menus proc ::createBrContextMenuShortcutKey {Key MenuItem args} { if {$Key == "->"} { lassign $args tree x y if {[regexp {^(\.model)|(\.fepre_model).+(\.content)|(\.include)|(\.comp)|(\.assem)|(\.mat)|(\.prop).+__treectrl$} $tree]} { #get selections: set view [hwbrmanager view current] uplevel #0 [hmbr::SelectionManager::Instance] set $view set selectedItems [uplevel #0 [hmbr::SelectionManager::Instance] get] uplevel #0 [::hmbr::OperationManager::Instance] perform hmbr::[string tolower [regsub {[\s]+} $MenuItem ""]] [list $selectedItems] } return } bind TreeCtrl <Key-$Key> [list ::createBrContextMenuShortcutKey -> $MenuItem %W %x %y] } ::createBrContextMenuShortcutKey d Delete ::createBrContextMenuShortcutKey D Delete ::createBrContextMenuShortcutKey h Hide ::createBrContextMenuShortcutKey H Hide ::createBrContextMenuShortcutKey s Show ::createBrContextMenuShortcutKey S Show ::createBrContextMenuShortcutKey i Isolate ::createBrContextMenuShortcutKey I Isolate
0