#!MC 1000 ################################################## # Add a button to Quick Macro Panel to create # the value blank variable. This must only # be run once for each dataset. If this is # run more than once then the incorrect # value blanking variable will be referenced. # Tecplot at this time has no way to check # in a macro if a variable is valid other # than to just try and use it and generate # and error, unfortunately this will stop # the macro processing. # # Modified 03/02/2006 Ben Medina-Orton # $!MacroFunction Name = "CreateIJKBlankVar" ShowInMacroPanel = true $!ALTERDATA Equation = '{tempvblankvar} = 1' $!BLANKING VALUE { Var = |NumVars| } $!RunMacroFunction "IJKBlankInterior" $!EndMacroFunction ################################################## # Add a button to Quick Macro Panel to reset the # value blank variable to all 1's. Call this # prior to reassigning the blanking region for # a group of zones # $!MacroFunction Name = "ResetIJKBlankVar" ShowInMacroPanel = true $!ALTERDATA Equation = 'b = 1' $!EndMacroFunction ################################################## # # Add a button to Quick Macro Panel to set blanking # to blank out the "interior" region. # $!MacroFunction Name = "IJKBlankInterior" ShowInMacroPanel = true $!RunMacroFunction "SetIJKBlankDomain" ("YES") $!EndMacroFunction ################################################## # # Add a button to Quick Macro Panel to set blanking # to blank out the "exterior" region. # $!MacroFunction Name = "IJKBlankExterior" ShowInMacroPanel = true $!RunMacroFunction "SetIJKBlankDomain" ("NO") $!EndMacroFunction ################################################## # Brute force macro used to prompt the user for # all information needed to custom blank a zone. # # This essentially loads some variables and then calls # IJKBlankZoneByValue. # $!MacroFunction Name = "IJKBlankZone" ShowInMacroPanel = true $!PromptForTextString |ZoneToBlank| Instructions = "Enter the number of the zone to blank" $!PromptForTextString |IRangeMin| Instructions = "Enter I-Min" $!PromptForTextString |IRangeMax| Instructions = "Enter I-Max" $!PromptForTextString |JRangeMin| Instructions = "Enter J-Min" $!PromptForTextString |JRangeMax| Instructions = "Enter J-Max" $!PromptForTextString |KRangeMin| Instructions = "Enter K-Min" $!PromptForTextString |KRangeMax| Instructions = "Enter K-Max" $!RunMacroFunction "IJKBlankZoneByValue" (|ZoneToBlank|,|IRangeMin|,|IRangeMax|,|JRangeMin|,|JRangeMax|,|KRangeMin|,|KRangeMax|) $!EndMacroFunction ########################################################### # # # The remaining are utility macro functions that do # # not show up in the quick macro panel. These functions # # can be used by any user written macros processed by # # tecplot # # # ########################################################### ################################################## # Switch the IJK blanking Domain. # # Parameter Description # -------------------------------- # 1 Blank Interior? (YES,NO) $!MacroFunction Name = "SetIJKBlankDomain" Retain = Yes ShowInMacroPanel = No $!BLANKING VALUE { Include = Yes ValueCutOff = 0.5 CutBelow = |1| ValueBlankMode = CornerRule } $!EndMacroFunction ################################################## # Function Name: IJKBlankZoneByValue # # Parameter Description # -------------------------------- # 1 Zone to blank # 2 IMin # 3 IMax # 4 JMin # 5 JMax # 6 KMin # 7 KMax # # This macro sets the value blanking variable in # the zone specified so that value blanking can # be used to simulate IJK blanking. This allows # you to overcome the limitation in the IJKBlanking # option in tecplot that only allows you to # blank a single zone. # # This macro function assumes that the macro # function "CreateIJKBlankVar" has been # called prior to any calls to this function. $!MacroFunction Name = "IJKBlankZoneByValue" ShowInMacroPanel = No Retain = Yes $!VarSet |FinalIMax| = |3| $!VarSet |FinalJMax| = |5| $!VarSet |FinalKMax| = |7| $!VarSet |FinalIMax| -= 1 $!VarSet |FinalJMax| -= 1 $!VarSet |FinalKMax| -= 1 $!ALTERDATA [|1|] IRANGE { MIN = |2| MAX = |FinalIMax| } JRANGE { MIN = |4| MAX = |FinalJMax| } KRANGE { MIN = |6| MAX = |FinalKMax| } EQUATION = 'b = 0' $!EndMacroFunction