######################################################################
#
# Macro Name    : c:/gemcom/surpac/surpacv6.1/tutorials/block_modelling/data_work/_07_calculated_attributes.tcl
#
# Version       : Surpac 6.1 Beta 6
#
# Creation Date : Tue Aug 26 13:08:23 2008
#
# Description   : 
#
######################################################################

if { [catch {
set status [ SclFunction "BLOCK MODEL OPEN" {
  frm00906={
    {
      modname="training2.mdl"
      use_const="N"
    }
  }
}]
}]}  {
puts "There is no training2.mdl. This could occur if you haven't yet run previous block modelling macros. Opening training.mdl instead."
set status [ SclFunction "BLOCK MODEL OPEN" {
  frm00906={
    {
      modname="training.mdl"
      use_const="N"
    }
  }
}]
}

set status [ SclFunction "BM GRAPHICS DRAW" {
  frm20503={
    {
      _action="display"
      display="normal"
      constraint="N"
      slice="N"
      rescale="Y"
      all_blocks="N"
      cloud_marker="."
      cloud_size="1"
    }
  }
}]

set status [ SclFunction "VIEW BY BEARING" {
  frm00289={
    {
      _action="display"
      bearing="70"
      dip="-30"
    }
  }
}]

set status [ SclFunction "BM GRAPHICS CONSTRAIN ADD" {
  frm20111={
    {
      _action="display"
      constraints=table { not op contype location id rnga rngb lbound ubound ext } {
        { "" "INSIDE" "3DM" "QPY" "1" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
      }
      conexp=""
      confile="qpy"
      keep_blocks="N"
    }
  }
  frm00121={
    {
      _action="display"
    }
  }
}]

set status [ SclFunction "BM GRAPHICS ATTRIBUTE COLOUR" {
  frm20504={
    {
      _action="display"
      first_colour="blue"
      attribute="gold"
      smooth_transition="Y"
      transparency_percentage="0"
      block_model_transparency="N"
      default_face="pink"
      range="-99;1;3;5;10;99"
      numdecimals="2"
      styles_file=""
      save_now="N"
      load_styles_file="ssi_styles:bm_colours.ssi"
      last_colour="red"
      default_edge="blue"
      attribute_list=table { color char_attrib } {
        { "blue" "-99.00 -> 1.00" }
        { "r=0.00 g=1.00 b=1.00" "1.00 -> 3.00" }
        { "r=0.00 g=1.00 b=0.00" "3.00 -> 5.00" }
        { "r=1.00 g=1.00 b=0.00" "5.00 -> 10.00" }
        { "red" "10.00 -> 99.00" }
      }
    }
  }
}]

set status [ SclFunction "BM ADD ATTRIBUTE" {
  frm20150={
    {
      _action="display"
      attributes={
        {
          name="au_cut"
          type="calculated"
          decimals="2"
          bgv=""
          description="iif(gold>20,20,gold)"
        }
      }
    }
  }
}]

set status [ SclFunction "BM GRAPHICS BLOCK ID" {
  select_block={
    {
      winx="0.168"
      winy="-0.390"
      objectx="1440.228"
      objecty="7150.824"
      objectz="890.021"
    }
  }
  frm20505={
    {
      _action="display"
    }
  }
}]

set status [ SclFunction "TOOL MODE TRADITIONAL" {} ]

set status [ SclFunction "TOOL CANCEL CURRENT" {} ]
 
puts ""
puts ""
puts "macro _07_calculated attributes.tcl completed"
puts ""


