🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Custom Guidebar - Apply or Proceed with middle mouse

User: "SLadisch"
Altair Community Member

Description: How to use the middle mouse button to apply or proceed in a custom guidebar

Product/Topic Name : HyperMesh 2024.1 - Custom Extension

I've sucessfuly added a custom guidebar to my extension. The guidebar has an apply (or proceed) button which does the job and clears the selection afterwards. And it has an "ok" button which does the job and closes the script.

Now the Question is: Is it possible to listen to the middel mouse button an fire the proceed-funktion. This is the way the most built-in-guidebars work.

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "SLadisch"
    Altair Community Member
    OP
    ########################################################################################
    # This is a tcl script that interfaces w/ HM. #
    ########################################################################################

    itcl::class ::HoermannScriptingHM::RodMeshCtx {
    inherit ::hm::context::HMScriptableBase
    constructor {args} {}

    public method proceed {args};
    public method ok {args};
    }

    itcl::body ::HoermannScriptingHM::RodMeshCtx::proceed {args} {

    set nodeIdList [ctx::selection ids "NodeSel"]

    ::HoermannScriptingHM::RodMesh $nodeIdList

    ctx::selection clear "NodeSel"
    ctx::selection clear "NodeSel"
    }

    itcl::body ::HoermannScriptingHM::RodMeshCtx::ok {} {
    proceed
    ctx exit
    }

    proc ::HoermannScriptingHM::RodMesh { nodeIdList } {

    eval *createlist nodes 1 $nodeIdList

    set node_list [ hm_getlist nodes 1 ]
    #set node_list [ctx::selection ids NodeSel]

    puts $nodeIdList
    puts $node_list
    if { ! [ Null node_list ] } {
    *createelements1d nodes list=1 useelemdensity=1 elemdensity=1 engineeringconfig=ROD propcardimage=PROD linecomp=0 useshell=0 biasintensity=0 biasstyle=0
    }
    }


    #::CustomerName::Main

    ctx::manager register hm RodMeshCtx "::HoermannScriptingHM::RodMeshCtx"
    User: "SLadisch"
    Altair Community Member
    OP

    Any idea? Anyone?