I want to register a proc and want to call back it when ever i use *translatemark nodes (Shift + f4 ) to move nodes

Hypermesh User
Hypermesh User Altair Community Member
edited January 2021 in Community Q&A

I used the below command to call the proc ::minanglecorrection3d, but it's not calling the proc once I have done with *translate nodes (Shift + f4 ) to move nodes

catch {hm_framework registerproc ::minanglecorrection3d after_*translatemark nodes 1 1 0.1}

 

Please help me to register a proc and need to call it whenever I use *translatemark nodes (Shift + f4 ) to move nodes

Best Answer

  • tinh
    tinh Altair Community Member
    edited December 2020 Answer ✓

    Yes,

    this command will unregister the callback:

    ::hwt::RemoveCallback *translatemark ::minanglecorrection3d

Answers

  • tinh
    tinh Altair Community Member
    edited December 2020

    Hi,

    hm_framework just accepts some special callback events (user profile changed, menu redraw,..)

    to add callback to *commands you need to use:

    ::hwt::AddCallback *translatemark ::minanglecorrection3d "after"

     

    your callback proc must have an argument as placeholder for HM passing *translatemark... into

    example

    proc ::minanglecorrection3d {star_command} {

      puts "Command was performed: $star_command"

      .... do your work here

    }

  • Hypermesh User
    Hypermesh User Altair Community Member
    edited December 2020

    Hi Tinh,

     

        Thanks for your help Its work great, Is there any option to unregister the proc by passing command.

  • tinh
    tinh Altair Community Member
    edited December 2020 Answer ✓

    Yes,

    this command will unregister the callback:

    ::hwt::RemoveCallback *translatemark ::minanglecorrection3d

  • Hypermesh User
    Hypermesh User Altair Community Member
    edited December 2020

     Copy that Many thanks, Mr. Tinh.