Ask: How to set the shortcuts by command

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello,

 

I'd like to customize a shortcuts to let me get the function quickly to pick up the nodes attached with line. 
I just know set the hm_pushpanel {rigids} to the subpanel (1D--> rigids), but what is the related command to let me also include below action?

1) select 'multiple nodes'

2) select 'calculate node'

<?xml version="1.0" encoding="UTF-8"?>01.jpg

 

3) select 'by geoms'

<?xml version="1.0" encoding="UTF-8"?>02.jpg

 

4) select 'lines'

<?xml version="1.0" encoding="UTF-8"?>03.jpg

 

I try to key hm_pushpanel {rigid} {multiple nodes} {calculate node} {by geoms} {lines}, but it is not workable.

Could anyone teach me how to set it??

 

BTW, does anyone know where I can find the command list in the help document??

 

Thank you in advance.

Answers

  • tinh
    tinh Altair Community Member
    edited August 2016

    Hi,

    customizing panels are not usual documented fully. you can learn via sample script

    example:

     set ItemNumber [hm_getitemnumber rigids 'calculate node'] set ItemOwner [hm_getitemowner rigids $ItemNumber] hm_setpopup rigids $ItemOwner $ItemNumber

     

    with select nodes 'by line'. I didn't find direct command yet (using mouse hooking by twapi can do it, but it's a bit complicated).

    if you want, try invoking sub proc like this

     proc appendnodesbyline {{nodemark 1}} {      *createmarkpanel lines 1 'Select lines:'      if {[hm_marklength lines 1]} {            eval *appendmark nodes $nodemark {'by lines'} [hm_getmark lines 1]            hm_highlightmark nodes 1 h            *clearmark lines 1      } }

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2016

    Hi, 

     

    I appreciate your reply. I think it's hypermesh's limitation and can't support to write the code into the shortcuts setting directly.

    Anyway, I'll try your suggestion. 
    Thanks again!