Getting max/min variable values in a zone to create RECT

Tecplot's automation language

Python scripts were supported in the alpha version for Legacy 360 (2013). Python inquiries in 2017 should be directed to the PyTecplot Forum.

Moderators: davetaflin, salter, steve, jprenaud, straton, Chris Idso

zonexo
Expert
Posts: 59
Joined: Mon Feb 11, 2008 8:57 pm
Location: Singapore
Contact:

Getting max/min variable values in a zone to create RECT

Postby zonexo » Sun Oct 24, 2010 9:36 am

Hi,

I have data with many zones and variables.

I need to create a rectangle zone using CREATERECTANGULARZONE based on zone 18. When doing it manually, Tecplot is smart enough to choose the max/min values of the x,y,z in zone 18.

So when using marco, is this possible as well? When I record the macro, it only gives fix values.

I need to get the max/min variable for 1:x in zone 18: left vent.

I tried using:

$!CREATERECTANGULARZONE
IMAX = 40
JMAX = 40
KMAX = 40
X1 = |minvar[1]|

instead of

$!CREATERECTANGULARZONE
IMAX = 40
JMAX = 40
KMAX = 40
X1 = 92.7600021362

but it doesn't seem to work correctly. I tried to compare some values between the new and old ways and they are different.

Can someone help?

Thanks a lot!

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Getting max/min variable values in a zone to create RECT

Postby Chris Idso » Tue Oct 26, 2010 2:34 pm

Hi,

The minvar[n] internal macro variable works over all active zones, so if you have many active zones, and zone 18 is one of those, then minvar[n] will not return the correct value. If you have only zone 18 active, then minvar[n] will return the correct value.

You can activate or deactivate a zone in a macro by using the

$!ACTIVEFIELDMAPS command.

To activate only zone 18:

$!ACTIVEFIELDMAPS = [18]

To add zone 18 to the list of active zones:

$!ACTIVEFIELDMAPS += [18]

To remove zone 18 from the list of active zones:

$!ACTIVEFIELDMAPS -= [18]
Chris


Christopher Idso

Tech Support Lead
Tecplot, Inc

zonexo
Expert
Posts: 59
Joined: Mon Feb 11, 2008 8:57 pm
Location: Singapore
Contact:

Re: Getting max/min variable values in a zone to create RECT

Postby zonexo » Sat Oct 30, 2010 10:15 pm

Hi Chris,

Ya it worked. Thanks.

Btw,

I got a new zone which does not have time and strand attached to it.

I tried to record the marco and got:

COMMANDPROCESSORID = 'Strand Editor'
COMMAND = 'ZoneSet=4;AssignStrands=TRUE;StrandValue=16;'
$!EXTENDEDCOMMAND
COMMANDPROCESSORID = 'Strand Editor'
COMMAND = 'ZoneSet=4;AssignSolutionTime=TRUE;TimeValue=0.25;'

However, it seems that only the strandvalue works when I use the macro. Then by chance I found that I could add TimeOption=singlevalue before the TimeValue to set the time. But after that, the strandvalue can't work.

Do you know why?

Thanks

Chris Idso
Jedi Master
Posts: 249
Joined: Mon Jan 15, 2007 10:07 am
Location: Bellevue, WA
Contact:

Re: Getting max/min variable values in a zone to create RECT

Postby Chris Idso » Mon Nov 08, 2010 11:12 am

Hello,

It is not clear to us what you are asking.

Would you please tell us what you mean by

"However, it seems that only the strandvalue works when I use the macro." Eactly what happens when you try to animate your zones? Does one get skipped, or do the zones get rearranged?

Also, what do you mean when you say later in your email that "the strandvalue can't work. " ?
Chris





Christopher Idso



Tech Support Lead

Tecplot, Inc


Return to “Tecplot Macro Language”

Who is online

Users browsing this forum: No registered users and 0 guests