Repeat the macro

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

Hi Friends.

How I can repeat the macro?

I down loaded Create_Center_Node_Radious.tcl from altair site.

It is very usefull.

But every time i need to select the Tcl command.

After selecting 1 circle it is creating 1 node at center and then it is tcl coming out.

If i am having 100 Circles. Then every time i need select Tcl.

So i want to repeat the macro.

Thanks & Regards

Subbaraju

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited October 2012

    Hi Friend,

    try to put your script in a loop like this

    while {1} {

    *createmarkpanel lines 1 'Select circle(s) to create center:'

    if {[hm_marklength lines 1] == 0} {break}

    foreach LineID [hm_getmark lines 1] {

    CreateCenterOfCircle $LineID

    }

    }

    proc CreateCenterOfCircle {LineID} {

    #your script to create center of a circle

    #....

    }