clear mark

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

hello 

 

*createmarkpanel nodes 1 'select nodes'

*duplicatemark nodes 1 0

*createlistpanel surfaces 1 'Select surface'
set targetsurf [hm_getlist surfaces 1]

set targetsurfid1 [hm_getentityvalue nodes [lindex $targetsurf 0] 'id' 0];

*markprojectnormallytosurface nodes 1 $surfaceid1

*clearmark all 1


*createlistpanel surfaces 2 'Select surface for mark node'

*createmarkpanel nodes 2 'select nodes'

if { [ catch {*surfacemarkaddnodesfixed 2 2 0.00026801845 0 } ] } {
# Handle error
}

*nodecleartempmark

*clearmark nodes 1

*clearmark surfaces 1

hm_setpanelproc {hm_callpanel 'automesh';}
 

 

 

In this program at clear mark I am not able to clear the surface stored in surfaces 1

 

and also not able to retrive surfaces 2 in *surfacemarkaddnodesfixed command 

 

so have look

Thank you

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    Hi,

     

    Can you try this?

    *createmarkpanel nodes 1 'select nodes'

    *duplicatemark nodes 1 0

    *createlistpanel surfaces 1 'Select surface'
    set targetsurf [hm_getlist surfaces 1]

    set targetsurfid1 [hm_getentityvalue nodes [lindex $targetsurf 0] 'id' 0];

    *markprojectnormallytosurface nodes 1 surfaceid1

    *clearmark all 1


    *createlistpanel surfaces 2 'Select surface for mark node'

    *createmarkpanel nodes 2 'select nodes'

    if { [ catch {*surfacemarkaddnodesfixed 2 2 0.00026801845 0 } ] } {
    # Handle error
    }

    *nodecleartempmark

    *clearmark nodes 1

    *clearmark surfaces 1

    hm_setpanelproc {hm_callpanel 'automesh';}

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    Just removed $ before surfaceid1

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    its not working 

     

    same error as mine 'atleast one surface must be selected'

     

    and I want to remove all the mark before going to select surface and nodes for   *surfacemarkaddnodesfixed this command 

  • tinh
    tinh Altair Community Member
    edited July 2016

    Hi

    You create a list of surfs, so need to use *clearlist instead of *clearmark

     

    below red marks are potential buggy:

    'nodes'  => should be 'surfs' ?

    '*createlistpanel' create a list of surf, but using '*surfacemarkadd...'  ==> should be '*createmarkpanel surfs 2 ...

     

     

    *createmarkpanel nodes 1 'select nodes'

    *duplicatemark nodes 1 0

    *createlistpanel surfaces 1 'Select surface'
    set targetsurf [hm_getlist surfaces 1]

    set targetsurfid1 [hm_getentityvalue nodes [lindex $targetsurf 0] 'id' 0];

    *markprojectnormallytosurface nodes 1 $surfaceid1

    *clearmark all 1


    *createlistpanel surfaces 2 'Select surface for mark node'

    *createmarkpanel nodes 2 'select nodes'

    if { [ catch {*surfacemarkaddnodesfixed 2 2 0.00026801845 0 } ] } {
    # Handle error
    }

    *nodecleartempmark

    *clearmark nodes 1

    *clearmark surfaces 1

    hm_setpanelproc {hm_callpanel 'automesh';}

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    thank you very much 

     

    *clearlist   worked 

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    in above program suppose I want to run the first part for some definite times

     

    then I will press a perticular key or message (till time it should repeat same set of commands)

     

    and then it redirects to second part is it possible??

  • tinh
    tinh Altair Community Member
    edited July 2016

    in above program suppose I want to run the first part for some definite times

     

    then I will press a perticular key or message (till time it should repeat same set of commands)

     

    and then it redirects to second part is it possible??

     

    Sorry I don't understand your meaning

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    *createmarkpanel surfaces 1 'Select surface for mark node'

    *createlistpanel nodes 1 'select nodes'

    *surfacemarksplitwithnodes 1 1
     

     

    so I want to run above program 4-5 times depends on situation 

     

    then I should run following once

     

    *createmarkpanel nodes 1 'select nodes'

    *duplicatemark nodes 1 0

    *createlistpanel surfaces 1 'Select surface'

    set targetsurf [hm_getlist surfaces 1]

    set targetsurfid1 [hm_getentityvalue surfaces [lindex $targetsurf 0] 'id' 0];

    *markprojectnormallytosurface nodes 1 $surfaceid1

    *clearmark all 1

    *clearlist surfaces 1 

    *createmarkpanel surfaces 2 'Select surface for mark node'

    *createmarkpanel nodes 2 'select nodes'
    if { [ catch {*surfacemarkaddnodesfixed 2 2 0.00026801845 0 } ] } {
    # Handle error
    }

    *nodecleartempmark

    *clearmark nodes 2

    *clearmark surfaces 2

    hm_setpanelproc {hm_callpanel 'automesh';}
     

     

     

    so is it possible??

     

    I tried calling panel 'surface edit' instead of first part but it wont allow rest of program to continue 

    ??

  • tinh
    tinh Altair Community Member
    edited July 2016

    yes, it is. i already tell you to use while loop. did you apply it?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2016

    Yes but while loop will continue for infinitely r8??

     

    How can I skip that while loop after some iterations and then go to next command execution

  • tinh
    tinh Altair Community Member
    edited July 2016

    don't you see break command?