Auto change current component after excuting a command from pushpanel
I wrote a tcl script to auto change current component after I excute a command from pushpanel.
Here is my script:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
hm_pushpanel {velocities}
set loadid [hm_info currentcollector loadcol]
incr loadid
if {[hm_entityinfo exist loadcol $loadid -byid] == 1} {
set loadname [hm_getentityvalue loadcol $loadid name 1 -byid]
*retainmarkselections 1
*currentcollector loadcol '$loadname'
*retainmarkselections 0
} else {
return
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I'll call out a pushpanel first, in this example : velocities panel.
And I will create an initial velocity for current component and press the create button in this panel.
I know how to change the current component.
I have no idea about how to write the command script after pressing the create button and then change the current component to the next component.
Does anyone can help me?
A right programming flow is : make the script to create loads instead of clicking