Auto change current component after excuting a command from pushpanel

Yu-Ju Chen_20500
Yu-Ju Chen_20500 Altair Community Member
edited October 2020 in Community Q&A

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?

<?xml version="1.0" encoding="UTF-8"?>Screenshot - 2019_5_3 , 12_11_50.png

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited May 2019

    A right programming flow is : make the script to create loads instead of clicking

  • Yu-Ju Chen_20500
    Yu-Ju Chen_20500 Altair Community Member
    edited May 2019

    A right programming flow is : make the script to create loads instead of clicking

    Hi, Tinh,

    Thanks for your reply!