######################################################################
#
# Macro Name    : grid.tcl
#
# Version       : Surpac Vision V5.0-K
#
# Creation Date : Tue Mar 22 08:34:03 2005
#
# Description   : 
#
######################################################################
#start of input form

   set form {
GuidoForm InputForm {
  -label "Create Grid"
  -default_buttons

   GuidoField N_Origin {
    -label "Northing of Origin"
    -display_length 10
    -null false
 }

  GuidoField N_Extent {
    -label "Extent of Northings"
    -display_length 10
    -null false
 }

  GuidoField N_Spacing {
    -label "Interval of Northing Points"
    -display_length 10
    -null false
 }
 
  GuidoField E_Origin {
    -label "Easting of Origin"
    -display_length 10
    -null false
 }
 
  GuidoField E_Extent {
    -label "Extent of Eastings"
    -display_length 10
    -null false
 }
 
   GuidoField E_Spacing {
    -label "Interval of Easting Points"
    -display_length 10
    -null false
 }
 
 
}
}
 SclCreateGuidoForm form_handle $form {}

$form_handle SclRun {}

# End of Input form






set Northing [expr $N_Origin]
set Easting [expr $E_Origin]


  while {$Easting <= $E_Extent} {

   while {$Northing <= $N_Extent} {
set status [ SclFunction "CREATE POINT" {
  frm00474={
    {
      istr="1"
      ynew="$Northing"
      xnew="$Easting"
      znew="0"
      desc="0"
    }
  }
}]


set Northing [expr $Northing+$N_Spacing]
}


set Easting [expr $Easting+$E_Spacing]
set Northing $N_Origin
}
