/3.1
(Extension.1
	Name:	"Register and Transform Tool"
	Dependencies:	"$AVBIN/avdlog.dll\n"
	FirstRootClassName:	"Space"
	Roots:	2
	Roots:	3
	Roots:	4
	Roots:	5
	Roots:	6
	Roots:	7
	Roots:	8
	Roots:	9
	Roots:	10
	Roots:	11
	Roots:	12
	Roots:	13
	Roots:	14
	Roots:	15
	Roots:	16
	Roots:	17
	Roots:	18
	Roots:	19
	Roots:	20
	Roots:	21
	Roots:	22
	Roots:	23
	Roots:	24
	Roots:	25
	Roots:	26
	Roots:	27
	Roots:	28
	Roots:	29
	Roots:	30
	Roots:	31
	Roots:	172
	Version:	31
	About:	"Registers shapefiles, CAD files and images to new coordinates, creates world files, and transforms shapefiles. go to http://mlib319-pc28.csuchico.edu/tools/avenue/free.html for more information"
	CanUnloadScript:	205
	UnloadScript:	206
	InstallScript:	207
	UninstallScript:	208
	ExtVersion:	1
)

(Space.2
)

(Choice.3
	Label:	"Register and Tranform ..."
	Click:	"Transform.Tool.Start"
	Shortcut:	"Keys.None"
)

(Script.4
	Name:	"Transform.geographic_project_point"
	SourceCode:	"daview = av.getactivedoc\nif (_outputprj = nil) then\n  msgbox.info(\"hold on cowboy\",\"first youll have to set some properties\")\n\n  unitslist1 = {\"meters\",\"feet\",\"decimal degrees\",\"miles\",\"kilometers\",\"yards\",\n               \"centimeters\",\"inches\",\"millimeters\"}\n  unitslist2 = {#UNITS_LINEAR_METERS, #UNITS_LINEAR_FEET,\n                #UNITS_LINEAR_DEGREES, #UNITS_LINEAR_MILES,\n                #UNITS_LINEAR_KILOMETERS, #UNITS_LINEAR_YARDS,\n                #UNITS_LINEAR_CENTIMETERS, #UNITS_LINEAR_INCHES,\n      
          #UNITS_LINEAR_MILLIMETERS}\n  \n  _inputprj = prj.MakeNull\n  _inputprj.SetDescription(\"Geographic\")\n  _inputgeog = true\n\n  outputunits = MsgBox.ChoiceAsString(unitslist1,\"Please pick output units\",\"Projector!\")\n  if (outputunits = nil) then\n    exit\n  else \n    _outunits = unitslist2.Get(unitslist1.FindByValue(outputunits))\n  end\n  _outputprj = ProjectionDialog.Show(daview,_outunits)\n  if (_outputprj = nil) then\n    exit\n  end\nend\n\ndiself = self.getdialog\n\napply = diself.findbyname(\"apply\")\ncancel =
 diself.findbyname(\"cancel\")\nx_d = diself.findbyname(\"x_d\")\nx_m = diself.findbyname(\"x_m\")\nx_s = diself.findbyname(\"x_s\")\ny_d = diself.findbyname(\"y_d\")\ny_m = diself.findbyname(\"y_m\")\ny_s = diself.findbyname(\"y_s\")\n\nif (self = cancel) then\n  msgbox.info(\"stopping\",\"\")\n  diself.setmodalresult(nil)\n  diself.close\nend\n\n'--------------------------------\nLatD = x_d.gettext\nif ((latd = nil ) or (latD.count = 0)) then\n  exit\nend\n\nLatM = x_m.gettext\nif ((latm = nil ) or (latm.count = 0)) then\n  exit\nend\n\nLatS = x_s
.gettext\nif ((lats = nil ) or (lats.count = 0)) then\n exit\nend\n\nLatD = x_d.gettext.AsNumber.abs\nLatM = x_m.gettext.AsNumber\nLatS = x_s.gettext.AsNumber\n\nLat_value = LatD+(LatM/60)+(LatS/3600)\n\ncompassDir = x_d.gettext.left(1)\nif (compassDir = \"-\") then\n  Lat_value = Lat_value * -1\nend     \n'msgbox.info(lat_value.asstring,\"\")\n\n'--------------------------------\nLonD = y_d.gettext\nif ((Lond = nil ) or (LonD.count = 0)) then\n  exit\nend\n\nLonM = y_m.gettext\nif ((Lonm = nil ) or (Lonm.count = 0)) then\n  exit\nend\n\n
LonS = y_s.gettext\nif ((Lons = nil ) or (Lons.count = 0)) then\n exit\nend\n\nLonD = y_d.gettext.AsNumber.abs\nLonM = y_m.gettext.AsNumber\nLonS = y_s.gettext.AsNumber\n\nLon_value = LonD+(LonM/60)+(LonS/3600)\n\ncompassDir = y_d.gettext.left(1)\nif (compassDir = \"-\") then\n Lon_value = Lon_value * -1\nend\n'msgbox.info(lon_value.asstring,\"\")\n\ngeopt = point.make(Lon_value,Lat_value)\n'geoviewtheme = av.finddoc(\"view2\").findtheme(\"theme2.shp\")\n'dagftab = geoviewtheme.getftab\n'dagftab.StartEditingWithRecovery\n'drec = dagfta
b.addrecord\n'dagftab.setvalue(dagftab.findfield(\"shape\"),drec,geopt)\n'geoview.getgraphics.add(graphicshape.make(geopt))\nprjpt = geopt.returnprojected(_outputprj)  \n'msgbox.listasstring({prjpt.getx.asstring,prjpt.gety.asstring},\"good\",\"\")\ndiself.setmodalresult({prjpt.getx,prjpt.gety})       \n'Return {prjpt.getx,prjpt.gety}\ndiself.close\n\n\n"
)

(Script.5
	Name:	"Transform.GetAffineParameters"
	SourceCode:	"\nsrcList = SELF.Get(0).Clone\ndesList = SELF.Get(1).Clone\n\nif ((srcList.Count < 3) or (desList.Count < 3)) then\n  return nil\n  end\n\n'xTrans = 1 / 0\n'yTrans = 1 / 0\n'\n'for each pList in {desList}\n'  for each p in pList\n'    if (p.GetX < xTrans) then\n'      xTrans = p.GetX\n'      end\n'    if (p.GetY < yTrans) then\n'      yTrans = p.GetY\n'      end\n'    end\n'  end\n'\n'for each pList in {srcList,desList}\n'  for each p in pList\n'    p.SetX(p.GetX - xTrans)\n'    p.SetY(p.GetY - yTrans)\n'    end\n'  end\n\n' -- initial
ize matrices\n\ntop = {0,0,0}\nbot = {0,0,0}\ntmatrix = {{0,0,0},{0,0,0},{0,0,0}}\n\n' -- load matrices with coordinates\n\nfor each i in 0..(srcList.Count - 1)\n  sx = srcList.Get(i).GetX\n  sy = srcList.Get(i).GetY\n  tmatrix.Get(0).Set(0,tmatrix.Get(0).Get(0) + 1)\n  tmatrix.Get(0).Set(1,tmatrix.Get(0).Get(1) + sx)\n  tmatrix.Get(0).Set(2,tmatrix.Get(0).Get(2) + sy)\n  tmatrix.Get(1).Set(1,tmatrix.Get(1).Get(1) + (sx * sx))\n  tmatrix.Get(1).Set(2,tmatrix.Get(1).Get(2) + (sx * sy))\n  tmatrix.Get(2).Set(2,tmatrix.Get(2)
.Get(2) + (sy * sy))\n  \n  dx = desList.Get(i).GetX\n  dy = desList.Get(i).GetY\n  top.Set(0,top.Get(0) + dx)\n  top.Set(1,top.Get(1) + (sx * dx))\n  top.Set(2,top.Get(2) + (sy * dx))\n  bot.Set(0,bot.Get(0) + dy)\n  bot.Set(1,bot.Get(1) + (sx * dy))\n  bot.Set(2,bot.Get(2) + (sy * dy))\n  end\n\ntmatrix.Get(1).Set(0,tmatrix.Get(0).Get(1))\ntmatrix.Get(2).Set(1,tmatrix.Get(1).Get(2))\ntmatrix.Get(2).Set(0,tmatrix.Get(0).Get(2))\n\n' -- matrix algebra\n\nfor each i in 0..2\n  for each j in 0..2\n    if (j <> i) then\n      tmat
rix.Get(i).Set(j,tmatrix.Get(i).Get(j) / tmatrix.Get(i).Get(i))\n      end\n    end\n  tmatrix.Get(i).Set(i,1 / tmatrix.Get(i).Get(i))\n  \n  for each j in 0..2\n    if (j <> i) then\n      for each k in 0..2\n        if (k <> i) then\n          tmatrix.Get(j).Set(k,tmatrix.Get(j).Get(k) - \n              (tmatrix.Get(j).Get(i) * tmatrix.Get(i).Get(k)))\n          end\n        end\n      tmatrix.Get(j).Set(i,-(tmatrix.Get(j).Get(i)) *  \n          tmatrix.Get(i).Get(i))\n      end\n    end\n  end\n\n' -- calculate transformat
ion parameters (C,A,B,F,D,E)\n\ntparams = {0,0,0,0,0,0}\nfor each i in 0..2\n  for each j in 0..2\n    k = i + 3\n    tparams.Set(i,tparams.Get(i) + (tmatrix.Get(i).Get(j) * top.Get(j)))\n    tparams.Set(k,tparams.Get(k) + (tmatrix.Get(i).Get(j) * bot.Get(j)))\n    end\n  end\n\n'tparams.Set(0,tparams.Get(0) - xTrans)\n'tparams.Set(3,tparams.Get(3) - yTrans)\n\n' -- reorder parameters (A,B,C,D,E,F)\n\ntparams = {tparams.Get(1),tparams.Get(2),tparams.Get(0),\n           tparams.Get(4),tparams.Get(5),tparams.Get(3)}\n         
  \nreturn tparams\n"
)

(Script.6
	Name:	"Transform.GetConformalParameters"
	SourceCode:	"\nsrcList = SELF.Get(0)\ndesList = SELF.Get(1)\n\nif ((srcList.Count < 2) or (desList.Count < 2)) then\n  return nil\n  end\n\n' -- initialize matrices\n\ntop = {0,0,0,0}\ntmatrix = {{0,0,0,0},{0,0,0,0},{0,0,0,0},{0,0,0,0}}\n\nsumx2 = 0\nsumy2 = 0\nsumXx = 0\nsumYy = 0\nsumXy = 0\nsumYx = 0\n\n' -- load matrices with coordinates\n\nfor each i in 0..(srcList.Count - 1)\n  sx = srcList.Get(i).GetX\n  sy = srcList.Get(i).GetY\n  \n  tmatrix.Get(2).Set(2,tmatrix.Get(2).Get(2) + 1)\n  tmatrix.Get(0).Set(2,tmatrix.Get(0).Get(2) + sx)\n  tma
trix.Get(0).Set(3,tmatrix.Get(0).Get(3) + sy)\n\n  sumx2 = sumx2 + (sx ^ 2)\n  sumy2 = sumy2 + (sy ^ 2)\n  \n  dx = desList.Get(i).GetX\n  dy = desList.Get(i).GetY\n\n  top.Set(2,top.Get(2) + dx)\n  top.Set(3,top.Get(3) + dy)\n  \n  sumXx = sumXx + (dx * sx)\n  sumYy = sumYy + (dy * sy)\n  sumXy = sumXy + (dx * sy)\n  sumYx = sumYx + (dy * sx)\n  end\n\ntmatrix.Get(0).Set(0,sumx2 + sumy2)\ntmatrix.Get(1).Set(1,tmatrix.Get(0).Get(0))\ntmatrix.Get(1).Set(2,tmatrix.Get(0).Get(3))\ntmatrix.Get(1).Set(3,-(tmatrix.Get(0).Get(2)))\ntm
atrix.Get(2).Set(0,tmatrix.Get(0).Get(2))\ntmatrix.Get(2).Set(1,tmatrix.Get(1).Get(2))\ntmatrix.Get(3).Set(0,tmatrix.Get(0).Get(3))\ntmatrix.Get(3).Set(1,tmatrix.Get(1).Get(3))\ntmatrix.Get(3).Set(3,tmatrix.Get(2).Get(2))\n\ntop.Set(0,sumXx + sumYy)\ntop.Set(1,sumXy - sumYx)\n\n' -- matrix algebra\n\nfor each i in 0..3\n  for each j in 0..3\n    if (j <> i) then\n      tmatrix.Get(i).Set(j,tmatrix.Get(i).Get(j) / tmatrix.Get(i).Get(i))\n      end\n    end\n  tmatrix.Get(i).Set(i,1 / tmatrix.Get(i).Get(i))\n  \n  for each j in
 0..3\n    if (j <> i) then\n      for each k in 0..3\n        if (k <> i) then\n          tmatrix.Get(j).Set(k,tmatrix.Get(j).Get(k) - \n              (tmatrix.Get(j).Get(i) * tmatrix.Get(i).Get(k)))\n          end\n        end\n      tmatrix.Get(j).Set(i,-(tmatrix.Get(j).Get(i)) *  \n          tmatrix.Get(i).Get(i))\n      end\n    end\n  end\n\n' -- calculate transformation parameters (A,B,C,F)\n\ntparams = {0,0,0,0}\nfor each i in 0..3\n  for each j in 0..3\n    tparams.Set(i,tparams.Get(i) + (tmatrix.Get(i).Get(j) * top.
Get(j)))\n    end\n  end\n\nreturn tparams"
)

(Script.7
	Name:	"Transform.GetResiduals"
	SourceCode:	"\nsrcList = SELF.Get(0)\ndesList = SELF.Get(1)\ntparams = SELF.Get(2)\n\nresiduals = av.Run(\"Transform.Process\",{srcList,tparams,true})\n\nfor each i in 0..(srcList.Count - 1)\n  residuals.Set(i,residuals.Get(i) - desList.Get(i))\n  end\n\nreturn residuals\n"
)

(Script.8
	Name:	"Transform.GetRMSError"
	SourceCode:	"\nsrcList = SELF.Get(0)\ndesList = SELF.Get(1)\ntparams = SELF.Get(2)\n\ntdesList = av.Run(\"Transform.Process\",{desList,tparams,false})\ntsrcList = av.Run(\"Transform.Process\",{srcList,tparams,true})\n\nsrcErr = 0\ndesErr = 0\n\nfor each i in 0..(srcList.Count - 1)\n  srcErr = srcErr + (srcList.Get(i).Distance(tdesList.Get(i)) ^ 2)\n  desErr = desErr + (desList.Get(i).Distance(tsrcList.Get(i)) ^ 2)\n  end\n\nreturn {(srcErr / srcList.Count).Sqrt,(desErr / srcList.Count).Sqrt}\n"
)

(Script.9
	Name:	"Transform.GetValidPairs"
	SourceCode:	"\ninSrcList = SELF.Get(0)\ninDesList = SELF.Get(1)\n\nmaxNum = (inSrcList.Count min inDesList.Count)\nif (maxNum = 0) then\n  return {{},{},{}}\n  end\n\nsrcList = List.Make\ndesList = List.Make\nindexes = List.Make\n\nfor each i in 0..(maxNum - 1)\n  s = inSrcList.Get(i)\n  d = inDesList.Get(i)\n  if ((s.Is(Point)) and (d.Is(Point))) then\n    if ((s.GetX.IsNull.Not) and (s.GetY.IsNull.Not) and\n        (d.GetX.IsNull.Not) and (d.GetY.IsNull.Not)) then\n      srcList.Add(s)\n      desList.Add(d)\n      indexes.Add(i + 0)\n     
 end\n    end\n  end\n\nreturn {srcList,desList,indexes}\n"
)

(Script.10
	Name:	"Transform.Math.Atan2"
	SourceCode:	"'\n'  Transform.Math.Atan2 -- Arctangent on Two Values\n'    Peter Girard   ESRI-Boston   3/98\n'\n'  Input:   list\n'             0) number, x-value\n'             1) number, y-value\n'             2) boolean, optional, default false, true to return negative angles\n'\n'  Output:  number, angle, in radians\n'\n'\n'  Note:    Avenue allows division by zero -- it returns positive or negative\n'           infinity based on the numerator.  The arctangent (Atan) request will\n'           will correctly return +PI/4 or -PI/4 
(+90 or -90 degrees) in these\n'           cases.\n'\n'----------------------------------------------------------------------------------\n\nx = SELF.Get(0)\ny = SELF.Get(1)\nallowNeg = false\nif (SELF.Count = 3) then\n  allowNeg = SELF.Get(2)\n  end\n  \na = (y / x).Atan\nif (x < 0) then\n  if (y >= 0) then\n    a = a + Number.GetPi\n  else\n    a = a - Number.GetPi\n    end\n  end\n\nif ((a < 0) and (not allowNeg)) Then\n  a = (Number.GetPi * 2) + a\n  end\n\nreturn a\n"
)

(Script.11
	Name:	"Transform.Process"
	SourceCode:	"\ninData = SELF.Get(0)\ntparams = SELF.Get(1)\nif (SELF.Count = 3) then\n  forward = SELF.Get(2)\nelse\n  forward = true\n  end\n\ndepth = 0\nif (inData.Is(Point)) then\n  inData = {inData}\n  depth = depth + 1\n  end\nif (inData.Get(0).Is(Point)) then\n  inData = {inData}\n  depth = depth + 1\n  end\n\nA = tparams.Get(0)\nB = tparams.Get(1)\nC = tparams.Get(2)\nD = tparams.Get(3)\nif (tparams.Count > 4) then\n  E = tparams.Get(4)\n  F = tparams.Get(5)\n  end\n\noutData = List.Make\nfor each inPointList in inData\n  outPointList = List.
Make\n  for each p in inPointList\n    tp = p.Clone\n    if (forward) then\n      if (tparams.Count = 4) then\n        tp.SetX((A * p.GetX) + (B * p.GetY) + C)\n        tp.SetY(-(B * p.GetX) + (A * p.GetY) + D)\n      else\n        tp.SetX((A * p.GetX) + (B * p.GetY) + C)\n        tp.SetY((D * p.GetX) + (E * p.GetY) + F)\n        end\n    else\n      if (tparams.Count = 4) then\n        tp.SetX(((A * p.GetX) - (B * p.GetY) + (B * D) - (A * C)) / ((A * A) + (B * B)))\n        tp.SetY((p.GetY + (B * tp.GetX) - D) / A)\n    
  else\n        tp.SetX(((E * p.GetX) - (B * p.GetY) + (B * F) - (E * C)) / ((E * A) - (B * D)))\n        tp.SetY((p.GetY - (D * tp.GetX) - F) / E)\n        end\n      end\n    outPointList.Add(tp)\n    end\n  outData.Add(outPointList)\n  end\n\nwhile (depth > 0)\n  outData = outData.Get(0)\n  depth = depth - 1\n  end\n  \nreturn outData"
)

(Script.12
	Name:	"Transform.Tool.Apply"
	SourceCode:	"theView = av.GetActiveDoc\nif (theView.Is(View).Not) then\n  return nil\n  end\n\n' -- get info about the dialog\ntheDialog = SELF.GetDialog\nfillMode = theDialog.FindByName(\"optFill\").IsSelected\nparams = theDialog.GetObjectTag.Get(\"sourceParams\")\norigPoints = theDialog.GetObjectTag.Get(\"origpts\")\n\nlstCoords = theDialog.FindByName(\"lstCoords\")\nlstCoords.GoRowColumn(lstCoords.GetCurrentRow,0)\nn = lstCoords.GetCurrentValue\n\n' -- add a point\nif ((SELF.GetName = \"btnSrcPoint\") or (SELF.GetName = \"btnDesPoint\") or (SEL
F.GetName = \"DMS\")) then\n  if ((SELF.GetName = \"btnSrcPoint\") or (SELF.GetName = \"DMS\")) then\n    type = \"source\"\n  else\n    type = \"destination\"\n  end\n\n  if (fillMode) then\n    n = av.Run(\"Transform.Tool.FindEmpty\",type)\n  end\n\n  p = theView.GetDisplay.ReturnUserPoint\n  origPoints.add(p)\n  tp = p.Clone\n  if ((type = \"source\") and (params <> nil)) then\n    tp = av.Run(\"Transform.Process\",{p,params,false})\n  end\n    \n  av.Run(\"Transform.Tool.UpdateValue\",{tp,type})\n'  av.Run(\"Transform.Tool.UpdateGraphics\",{
\"update\",n.AsNumber,type,p,theView})\n  av.Run(\"Transform.Tool.UpdateGraphics\",{\"update\",n,type,p,theView})\n\n  '----------added by tracy--------------------\n  if (SELF.GetName = \"DMS\") then\n    if (SELF.GetName = \"DMS\") then\n      GPP = av.finddialog(\"geographic_pt_projector\")\n      GPP.open\n      xylist = GPP.getmodalresult\n      if (xylist = nil) then\n        msgbox.info(\"bye\",\"\")\n        exit\n      end\n      thedrawpoint = Point.Make(xylist.get(0),xylist.get(1))\n    elseif (SELF.GetName = \"ProjectPoint\") 
then\n      if (_inputprj = nil) then\n        unitslist1 = {\"meters\",\"feet\",\"decimal degrees\",\"miles\",\"kilometers\",\"yards\",\n                     \"centimeters\",\"inches\",\"millimeters\"}\n        unitslist2 = {#UNITS_LINEAR_METERS, #UNITS_LINEAR_FEET,\n                      #UNITS_LINEAR_DEGREES, #UNITS_LINEAR_MILES,\n                      #UNITS_LINEAR_KILOMETERS, #UNITS_LINEAR_YARDS,\n                      #UNITS_LINEAR_CENTIMETERS, #UNITS_LINEAR_INCHES,\n                      #UNITS_LINEAR_MILLIMETERS}\n        \n  
      inputunits = MsgBox.ChoiceAsString(unitslist1,\"Please pick input units\",\"\")\n        if (inputunits = nil) then\n          exit\n        else \n          _inunits = unitslist2.Get(unitslist1.FindByValue(inputunits))\n        end\n\n        if (inputunits = \"decimal degrees\") then\n          _inputprj = prj.MakeNull\n          _inputprj.SetDescription(\"Geographic\")\n          _inputgeog = true\n        else\n          _inputprj = ProjectionDialog.Show(theview,_inunits)\n          if (_inputprj = nil) then\n         
   exit\n          end\n          _inputgeog = false\n        end\n        xylist = msgbox.multiinput(\"enter the x and y\",\"\",{\"x\",\"y\"},{\"\",\"\"})\n        if (xylist = nil) then\n          msgbox.info(\"bye\",\"\")\n          exit\n        end\n        thepoint = Point.Make(xylist.get(0).asnumber,xylist.get(1).asnumber)\n        thepointunprj = thepoint.returnunprojected(_inputprj)\n        thedrawpoint = thepointunprj.ReturnProjected(_outputprj)\n      end\n    end    \n    if (_outputview = nil) then\n      _outputview = msgb
ox.listasstring(av.getproject.getdocswithgui(av.getproject.findgui(\"view\")),\"which view is your output view?\",\"\")\n      if (_outputview = nil) then\n        exit\n      end\n    end\n    type = \"destination\"\n    if (fillMode) then\n      n = av.Run(\"Transform.Tool.FindEmpty\",type)\n    end\n    'msgbox.info(thedrawpoint.getx.asstring,thedrawpoint.gety.asstring)\n    av.Run(\"Transform.Tool.UpdateValue\",{thedrawpoint,type})\n    av.Run(\"Transform.Tool.UpdateGraphics\",{\"update\",n,type,thedrawpoint,_outputview})\n  end\n 
 '-------------------------------------------------\nend\n\n' -- add a link\nif (SELF.GetName = \"btnLink\") then\n  if (fillMode) then\n    n = av.Run(\"Transform.Tool.FindEmpty\",\"link\")\n    end\n\n  theLine = theView.GetDisplay.ReturnUserLine\n\n  p1 = theLine.ReturnStart\n  tp1 = p1.Clone\n  if (params <> nil) then\n    tp1 = av.Run(\"Transform.Process\",{p1,params,false})\n    end\n  p2 = theLine.ReturnEnd\n  \n  av.Run(\"Transform.Tool.UpdateValue\",{tp1,\"source\"})\n  av.Run(\"Transform.Tool.UpdateValue\",{p2,\"destination\"})\n'  
av.Run(\"Transform.Tool.UpdateGraphics\",{\"update\",n.AsNumber,\"link\",p1,p2,theView})\n  av.Run(\"Transform.Tool.UpdateGraphics\",{\"update\",n,\"link\",p1,p2,theView})\n  end\n\nav.Run(\"Transform.Tool.ShowTransform\",nil)\n\n\n\n'----tracy parts\n'        typeit = msgbox.listasstring({\"convert between 2 projections\",\"convert from local coordinate\"},\"\",\"\")\n'        if (typeit = nil) then\n'          msgbox.info(\"confused eh?,\"\")\n'          exit\n'        end\n        \n'        else\n'          xylistorigin = msgbox.multiinput(\"en
ter the x and y in output coverage units for the origin\",\"\",{\"x\",\"y\"},{\"\",\"\"})\n'          if (xylistorigin = nil) then\n'            msgbox.info(\"bye\",\"\")\n'            exit\n'          end\n'\n'          xylist = msgbox.multiinput(\"enter the x and y in output coverage units for the control point\",\"\",{\"x\",\"y\"},{\"\",\"\"})\n'          if (xylist = nil) then\n'            msgbox.info(\"bye\",\"\")\n'            exit\n'          end\n'          \n'        end\n"
)

(Script.13
	Name:	"Transform.Tool.Close"
	SourceCode:	"\nav.Run(\"Transform.Tool.UpdateGraphics\",{\"clear\"})\n\nSELF.FindByName(\"lstCoords\").DefineFromList({})\n\nconfig = SELF.GetObjectTag\nSELF.Resize(SELF.ReturnExtent.GetWidth,config.Get(\"fullHeight\"))\nconfig.Get(\"tool\").Select\n\nconfig.Set(\"fullHeight\",nil)\nconfig.Set(\"tool\",nil)\nconfig.Set(\"sourceTheme\",nil)\nconfig.Set(\"sourceParams\",nil)\nconfig.Set(\"srcPoints\",nil)\nconfig.Set(\"origPts\",nil)\nconfig.Set(\"desPoints\",nil)\nconfig.Set(\"outParams\",nil)\nconfig.Set(\"graphics\",nil)\n"
)

(Script.14
	Name:	"Transform.Tool.DeleteGraphics"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\ntheGraphics = theDialog.GetObjectTag.Get(\"graphics\")\nif (SELF.Get(0) >= theGraphics.Count) then\n  return nil\n  end\nregGraphics = theGraphics.Get(SELF.Get(0))\n\ntype = SELF.Get(1)\n\nif ((type = \"source\") or (type = \"link\")) then\n  v0 = regGraphics.Get(0)\n  if (v0 <> nil) then\n    v0 = av.FindDoc(v0)\n    if (v0 <> nil) then\n      if (regGraphics.Get(1) <> nil) then\n        v0.GetGraphics.RemoveGraphic(regGraphics.Get(1))\n        regGraphics.Set(1,nil)\n        
end\n      if (regGraphics.Get(4) <> nil) then\n        v0.GetGraphics.RemoveGraphic(regGraphics.Get(4))\n        regGraphics.Set(4,nil)\n        end\n      end\n    regGraphics.Set(0,nil)\n    end\n  end\n\nif ((type = \"destination\") or (type = \"link\")) then\n  v0 = regGraphics.Get(2)\n  if (v0 <> nil) then\n    v0 = av.FindDoc(v0)\n    if (v0 <> nil) then\n      if (regGraphics.Get(3) <> nil) then\n        v0.GetGraphics.RemoveGraphic(regGraphics.Get(3))\n        regGraphics.Set(3,nil)\n        end\n      if (regGraphics.Ge
t(4) <> nil) then\n        v0.GetGraphics.RemoveGraphic(regGraphics.Get(4))\n        regGraphics.Set(4,nil)\n        end\n      end\n    regGraphics.Set(2,nil)\n    end\n  end\n\n"
)

(Script.15
	Name:	"Transform.Tool.EnterValue"
	SourceCode:	"\nif (SELF.GetText = \"\") then\n  return nil\n  end\n\ntheDialog = SELF.GetDialog\nsourceParams = theDialog.GetObjectTag.Get(\"sourceParams\")\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\nif (SELF.GetName.Middle(3,3) = \"Src\") then\n  type = \"source\"\nelse\n  type = \"destination\"\n  end\n\nif (theDialog.FindByName(\"optFill\").IsSelected) then\n  av.Run(\"Transform.Tool.FindEmpty\",type ++ SELF.GetName.Right(1))\n  end\ncurRow = lstCoords.GetCurrentRow\n\nav.Run(\"Transform.Tool.UpdateValue\",{SELF.GetText.AsNumber,type ++ \n    SEL
F.GetName.Right(1)})\nSELF.SetText(\"\")\n\nif (type = \"source\") then\n  p = theDialog.GetObjectTag.Get(\"srcPoints\").Get(curRow)\nelse\n  p = theDialog.GetObjectTag.Get(\"desPoints\").Get(curRow)\n  end\n  \nif ((p.GetX.IsNull) or (p.GetY.IsNull)) then\n  return nil\n  end\n\nlstCoords.GoRowColumn(curRow,0)\nn = lstCoords.GetCurrentValue\n\nif ((type = \"source\") and (sourceParams <> nil)) then\n  p = av.Run(\"Transform.Process\",{p,sourceParams})\n  end\n\nav.Run(\"Transform.Tool.ShowTransform\",nil)\n'av.Run(\"Transform.Tool.UpdateGrap
hics\",{\"update\",n.AsNumber,type,p,nil})\nav.Run(\"Transform.Tool.UpdateGraphics\",{\"update\",n,type,p,nil})\n\n"
)

(Script.16
	Name:	"Transform.Tool.FindEmpty"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nsrcPoints = theDialog.GetObjectTag.Get(\"srcPoints\")\ndesPoints = theDialog.GetObjectTag.Get(\"desPoints\")\n\nj = -1\nif (srcPoints.Count > 0) then\n  for each i in 0..(srcPoints.Count - 1)\n    s = srcPoints.Get(i)\n    d = desPoints.Get(i)\n    \n    noSrcX = ((s.Is(Point).Not) or (s.GetX.IsNull))\n    noSrcY = ((s.Is(Point).Not) or (s.GetY.IsNull))\n    noSrc = (noSrcX and noSrcY)\n    noDesX = ((d.Is(Point).Not) or (d.GetX.IsNull))\n    noDesY = ((d.Is(Point).Not) or
 (d.GetY.IsNull))\n    noDes = (noDesX and noDesY)\n    \n    if ((SELF = \"source X\") and noSrcX)      then  j = i + 0  break  end\n    if ((SELF = \"source Y\") and noSrcY)      then  j = i + 0  break  end\n    if ((SELF = \"source\") and noSrc)         then  j = i + 0  break  end\n    if ((SELF = \"destination X\") and noDesX) then  j = i + 0  break  end\n    if ((SELF = \"destination Y\") and noDesY) then  j = i + 0  break  end\n    if ((SELF = \"destination\") and noDes)    then  j = i + 0  break  end\n    if ((SELF = \"li
nk\") and noSrc and noDes) then  j = i + 0  break  end\n    end\n  end\n\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\nif (j = -1) then\n  if (lstCoords.GetRowCount = 0) then\n    n = 1\n  else\n    lstCoords.GoRowColumn(lstCoords.GetRowCount - 1,0)\n'    n = lstCoords.GetCurrentValue.AsNumber + 1\n    n = lstCoords.GetCurrentValue + 1\n    end\n  \n  srcPoints.Add(Point.MakeNull)\n  desPoints.Add(Point.MakeNull)\n  \n  theList = lstCoords.GetList\n'  theList.Add({n.AsString,\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"})\n  theList.Add({n,\"\"
,\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"})\n  lstCoords.DefineFromList(theList)\n  av.Run(\"Transform.Tool.SetFieldWidths\",nil)\n  \n  j = lstCoords.GetRowCount - 1\n  end\n\nlstCoords.GoRowColumn(j,0)\nlstCoords.SelectCurrent(false)\nlstCoords.ShowCurrent\n\nreturn lstCoords.GetCurrentValue\n"
)

(Script.17
	Name:	"Transform.Tool.GetGraphicsView"
	SourceCode:	"\ntargetView = SELF.Get(0)\n\nif (targetView <> nil) then\n  return targetView\n  end\n  \ndefaultView = SELF.Get(1)\n\nif (defaultView.Is(String)) then\n  defaultView = av.FindDoc(defaultView)\n  if (defaultView.Is(View).Not) then\n    defaultView = nil\n    end\n  end\n\nif (defaultView <> nil) then\n  return defaultView\n  end\n\ncurrentView = av.GetActiveDoc\nif (currentView.Is(View).Not) then\n  currentView = nil\n  end\n\nreturn currentView\n"
)

(Script.18
	Name:	"Transform.Tool.ListOperations"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\nif ((SELF.GetName = \"btnTest\") or (SELF.GetName = \"btnDelete\")) then\n  if (lstCoords.GetRowCount = 0) then\n    return nil\n    end\n\n  curRow = lstCoords.GetCurrentRow\n\n  if (SELF.GetName = \"btnTest\") then\n    lstCoords.GoRowColumn(curRow,1)\n    if (lstCoords.GetCurrentValue = \"\") then\n      lstCoords.SetCurrentValue(\"*\")\n    else\n      lstCoords.SetCurrentValue(\"\")\n      end\n    end\n\n  if (SELF.GetName = \"btnDe
lete\") then\n    theList = lstCoords.GetList\n'    n = theList.Get(curRow).Get(0).AsNumber\n    n = theList.Get(curRow).Get(0)\n    av.Run(\"Transform.Tool.UpdateGraphics\",{\"delete\",n})\n    \n    theList.Remove(curRow)\n    theDialog.GetObjectTag.Get(\"srcPoints\").Remove(curRow)\n    theDialog.GetObjectTag.Get(\"desPoints\").Remove(curRow)\n  \n    lstCoords.DefineFromList(theList)\n    av.Run(\"Transform.Tool.SetFieldWidths\",nil)\n    \n    if (curRow = theList.Count) then\n      curRow = curRow - 1\n      end\n    end\n\n  av.
Run(\"Transform.Tool.ShowTransform\",nil)\n  \n  lstCoords.GoRow(curRow)\n  lstCoords.SelectCurrent(false)\n  lstCoords.ShowCurrent\n  end\n\nif (SELF.GetName = \"btnClear\") then\n  lstCoords.DefineFromList({})\n  theDialog.GetObjectTag.Set(\"srcPoints\",{})\n  theDialog.GetObjectTag.Set(\"origPts\",{})\n  theDialog.GetObjectTag.Set(\"desPoints\",{})\n  av.Run(\"Transform.Tool.ShowTransform\",nil)\n  av.Run(\"Transform.Tool.UpdateGraphics\",{\"clear\"})\n  '_outputview = nil\n  theDialog.FindByName(\"txtTheme\").SetText(\"\")\n\nend\n"
)

(Script.19
	Name:	"Transform.Tool.Open"
	SourceCode:	"\nconfig = SELF.GetObjectTag\n\n'im not sure where he added the dictionary so ill just add one here\n'...tracy\nconfig.add(\"origpts\",{})\n\nconfig.Set(\"fullHeight\",SELF.ReturnExtent.GetHeight)\nconfig.Set(\"tool\",av.FindGUI(\"View\").GetToolBar.GetActive)\nconfig.Set(\"srcPoints\",{})\nconfig.Set(\"desPoints\",{})\nconfig.Set(\"origPts\",{})\n\nconfig.Set(\"graphics\",{nil})\n\nbtnSrcPoint = SELF.FindByName(\"btnSrcPoint\")\nbtnSrcPoint.SetApply(\"Transform.Tool.Apply\")\nbtnSrcPoint.SetHelp(\"Source Point//Places a source point\")\n\nbtnSrcP
oint = SELF.FindByName(\"DMS\")\nbtnSrcPoint.SetApply(\"Transform.Tool.Apply\")\nbtnSrcPoint.SetHelp(\"Source Point//Places a source point but interprets DMS\")\n\nbtnSrcPoint = SELF.FindByName(\"ProjectPoint\")\nbtnSrcPoint.SetApply(\"Transform.Tool.Apply\")\nbtnSrcPoint.SetHelp(\"Source Point//Places a source point, projecting it from a specified projection\")\n\nbtnDesPoint = SELF.FindByName(\"btnDesPoint\")\nbtnDesPoint.SetApply(\"Transform.Tool.Apply\")\nbtnDesPoint.SetHelp(\"Destination Point//Places a destination point\")\n\nbtnL
ink = SELF.FindByName(\"btnLink\")\nbtnLink.SetApply(\"Transform.Tool.Apply\")\nbtnLink.SetHelp(\"Link//Places a line connecting a source point to a destination point\")\n\noptConformal = SELF.FindByName(\"optConformal\")\noptConformal.SetClick(\"Transform.Tool.ShowTransform\")\noptConformal.Select\n\noptAffine = SELF.FindByName(\"optAffine\")\noptAffine.SetClick(\"Transform.Tool.ShowTransform\")\n\nSELF.FindByName(\"optFill\").Select\nSELF.FindByName(\"optEdit\").SetEnabled(false)\n\nbtnTheme = SELF.FindByName(\"btnTheme\")\nbtnTheme.SetCli
ck(\"Transform.Tool.SelectTheme\")\nbtnTheme.SetHelp(\"Sets the theme to transform, \" +\n    \"and reads from it any existing transformation parameters\")\n\nSELF.FindByName(\"txtTheme\").SetText(\"\")\n\nbtnToggleSize = SELF.FindByName(\"btnToggleSize\")\nbtnToggleSize.SetClick(\"Transform.Tool.ToggleSize\")\nbtnToggleSize.SetIcon(SELF.FindByName(\"btnUpIcon\").GetIcon)\nbtnToggleSize.SetHelp(\"Shrink//Show the small form\")\n\ntxtSrcX = SELF.FindByName(\"txtSrcX\")\ntxtSrcY = SELF.FindByName(\"txtSrcY\")\ntxtDesX = SELF.FindByName(\"txtDes
X\")\ntxtDesY = SELF.FindByName(\"txtDesY\")\n\ntxtSrcX.SetText(\"\")\ntxtSrcY.SetText(\"\")\ntxtDesX.SetText(\"\")\ntxtDesY.SetText(\"\")\n\ntxtSrcX.SetFocusLost(\"Transform.Tool.EnterValue\")\ntxtSrcY.SetFocusLost(\"Transform.Tool.EnterValue\")\ntxtDesX.SetFocusLost(\"Transform.Tool.EnterValue\")\ntxtDesY.SetFocusLost(\"Transform.Tool.EnterValue\")\n\ntxtSrcX.SetNextControl(txtSrcY)\ntxtSrcY.SetNextControl(txtDesX)\ntxtDesX.SetNextControl(txtDesY)\ntxtDesY.SetNextControl(txtSrcX)\n\nSELF.FindByName(\"lstCoords\").DefineFromList({})\n\nSELF.FindB
yName(\"txtSrcError\").SetText(\"\")\nSELF.FindByName(\"txtDesError\").SetText(\"\")\nSELF.FindByName(\"txtScale\").SetText(\"\")\nSELF.FindByName(\"txtRotation\").SetText(\"\")\n\nSELF.FindByName(\"btnTest\").SetClick(\"Transform.Tool.ListOperations\")\nSELF.FindByName(\"btnDelete\").SetClick(\"Transform.Tool.ListOperations\")\nSELF.FindByName(\"btnClear\").SetClick(\"Transform.Tool.ListOperations\")\n\nbtnWriteWorld = SELF.FindByName(\"btnWriteWorld\")\nbtnWriteWorld.SetClick(\"Transform.Tool.WriteWorld\")\nbtnWriteWorld.SetEnabled(true)\n\nbtnTrans
form = SELF.FindByName(\"btnTransform\")\nbtnTransform.SetClick(\"Transform.Tool.Transform\")\nbtnTransform.SetEnabled(false)\n\nbtnUpdate = SELF.FindByName(\"btnUpdate\")\nbtnUpdate.SetClick(\"Transform.Tool.UpdateCAD\")\nbtnUpdate.SetEnabled(false)\n\ntheView = av.GetActiveDoc\nif (theView.Is(View)) then\n  activeThemes = theView.GetActiveThemes\n  if (activeThemes.Count = 1) then\n    theTheme = activeThemes.Get(0)\n    if ((theTheme.Is(FTheme)) or (theTheme.Is(ITheme))) then\n      av.Run(\"Transform.Tool.SelectTheme\",theThem
e)\n      end\n    end\n  end\n"
)

(Script.20
	Name:	"Transform.Tool.SelectTheme"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\ntxtTheme = theDialog.FindByName(\"txtTheme\")\noptConformal = theDialog.FindByName(\"optConformal\")\noptAffine = theDialog.FindByName(\"optAffine\")\n\noptConformal.SetEnabled(true)\noptAffine.SetEnabled(true)\n\nif (SELF.Is(Theme)) then\n  theTheme = SELF\n\nelse\n  viewList = List.Make\n  for each d in av.GetProject.GetDocs\n    if (d.Is(View)) then\n      viewList.Add(d)\n      end\n    end\n  \n  theView = nil\n  if (viewList.Count > 0) then\n    theView = MsgBox.List(viewList
,\"Select the view containing the theme\",\n        \"Source Theme\")\n    end\n  if (theView = nil) then\n    return nil\n    end\n  \n  themeList = {\"\"}\n  for each t in theView.GetThemes\n    if ((t.Is(FTheme)) or (t.Is(ITheme))) then\n      themeList.Add(t)\n      end\n    end\n  \n  theTheme = MsgBox.List(themeList,\"Select the theme\",\"Source Theme\")\n  if (theTheme = nil) then\n    return nil\n    end\n  end\n\nif (theTheme = \"\") then\n  txtTheme.SetText(\"\")\n  theDialog.GetObjectTag.Set(\"sourceTheme\",nil)\n  theDialog.GetObject
Tag.Set(\"sourceParams\",nil)\n\nelse\n  params = nil\n  \n  if (theTheme.Is(FTheme)) then\n    theFTab = theTheme.GetFTab\n    if (theFTab.IsDrawing) then\n      if (theFTab.IsWorldFileEnabled) then\n        srcList = List.Make\n        desList = List.Make\n    \n        worldFile = LineFile.Make(theFTab.ReturnWorldFile,#FILE_PERM_READ)\n        inLine = worldFile.ReadElt\n        while (inLine <> nil)\n          points = inLine.AsTokens(\" \")\n          pList = points.Get(0).AsTokens(\",\")\n          p1 = (pList.Get(0).AsNumb
er)@(pList.Get(1).AsNumber)\n          srcList.Add(p1)\n          pList = points.Get(1).AsTokens(\",\")\n          p2 = (pList.Get(0).AsNumber)@(pList.Get(1).AsNumber)\n          desList.Add(p2)\n          inLine = worldFile.ReadElt\n          end\n        worldFile.Close\n        \n        if (srcList.Count = 1) then\n          params = {1,0,p2.GetX - p1.GetX,p2.GetY - p1.GetY}\n        else\n          params = av.Run(\"Transform.GetConformalParameters\",{srcList,desList})\n          end\n        end\n        \n      theDialo
g.FindByName(\"optConformal\").Select\n      end\n   \n  else\n    theISrc = theTheme.GetImgSrc\n  \n    mx = theISrc.ReturnMapExtent\n    pixX = mx.GetWidth / theISrc.GetNumColumns\n    pixY = mx.GetHeight / theISrc.GetNumRows\n    mx = mx.Move(pixX / 2,pixY / 2)\n  \n    srcList = {0@0,(theISrc.GetNumColumns)@0,\n               (theISrc.GetNumColumns)@(theISrc.GetNumRows)}\n    desList = {(mx.GetLeft)@(mx.GetTop),(mx.GetRight)@(mx.GetTop),\n               (mx.GetRight)@(mx.GetBottom)}\n  \n    params = av.Run(\"Transform.Ge
tAffineParameters\",{srcList,desList})\n    theDialog.FindByName(\"optAffine\").Select\n    end\n  \n  theDialog.FindByName(\"txtTheme\").SetText(theTheme.GetName)\n  theDialog.GetObjectTag.Set(\"sourceTheme\",theTheme)\n  theDialog.GetObjectTag.Set(\"sourceParams\",params)\n  end\n  \nav.Run(\"Transform.Tool.UpdateControls\",nil)"
)

(Script.21
	Name:	"Transform.Tool.SetFieldWidths"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\nlstCoords.GoColumn(0)\nlstCoords.SetColumnWidth(4)\nlstCoords.GoColumn(1)\nlstCoords.SetColumnWidth(5)\nlstCoords.GoColumn(2)\nlstCoords.SetColumnWidth(14)\nlstCoords.GoColumn(3)\nlstCoords.SetColumnWidth(14)\nlstCoords.GoColumn(4)\nlstCoords.SetColumnWidth(5)\nlstCoords.GoColumn(5)\nlstCoords.SetColumnWidth(14)\nlstCoords.GoColumn(6)\nlstCoords.SetColumnWidth(14)\nlstCoords.GoColumn(7)\nlstCoords.SetColumnWidth(5)\nlstCoords
.GoColumn(8)\nlstCoords.SetColumnWidth(14)\nlstCoords.GoColumn(9)\nlstCoords.SetColumnWidth(14)\n"
)

(Script.22
	Name:	"Transform.Tool.ShowTransform"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\nconfig = theDialog.GetObjectTag\ninSrcPoints = config.Get(\"srcPoints\")\ninDesPoints = config.Get(\"desPoints\")\n\ntxtSrcError = theDialog.FindByName(\"txtSrcError\")\ntxtDesError = theDialog.FindByName(\"txtDesError\")\ntxtScale = theDialog.FindByName(\"txtScale\")\ntxtRotation = theDialog.FindByName(\"txtRotation\")\n\ntxtSrcError.SetText(\"\")\ntxtDesError.SetText(\"\")\ntxtScale.SetText(\"\")\ntxtRotation.SetText(\"\")\n\ncurRow = lstCoo
rds.GetCurrentRow\n\nsrcPoints = List.Make\ndesPoints = List.Make\nindexes = List.Make\n\nif (inSrcPoints.Count > 0) then\n  for each i in 0..(inSrcPoints.Count - 1)\n    s = inSrcPoints.Get(i)\n    d = inDesPoints.Get(i)\n    if ((s.Is(Point)) and (d.Is(Point))) then\n      if ((s.GetX.IsNull.Not) and (s.GetY.IsNull.Not) and\n          (d.GetX.IsNull.Not) and (d.GetY.IsNull.Not)) then\n        lstCoords.GoRowColumn(i,1)\n        if (lstCoords.GetCurrentValue = \"\") then\n          srcPoints.Add(s)\n          desPoints.Add(
d)\n          indexes.Add(i + 0)\n          end\n        end\n      end\n    end\n  end\n\nparams = nil\n  \nif (srcPoints.Count > 0) then\n  for each i in 0..(lstCoords.GetRowCount - 1)\n    lstCoords.GoRowColumn(i,8)\n    lstCoords.SetCurrentValue(\"\")\n    lstCoords.GoRowColumn(i,9)\n    lstCoords.SetCurrentValue(\"\")\n    end\n  \n  if (theDialog.FindByName(\"optConformal\").IsSelected) then\n    params = av.Run(\"Transform.GetConformalParameters\",{srcPoints,desPoints})\n  else\n    params = av.Run(\"Transform.GetAffineParameters
\",{srcPoints,desPoints})\n    end\n  \n  if (params <> nil) then\n    residuals = av.Run(\"Transform.GetResiduals\",{srcPoints,desPoints,params})\n    for each i in 0..(srcPoints.Count - 1)\n      j = indexes.Get(i)\n      lstCoords.GoRowColumn(j,8)\n      lstCoords.SetCurrentValue(residuals.Get(i).GetX.SetFormat(\"d.ddd\"))\n      lstCoords.GoRowColumn(j,9)\n      lstCoords.SetCurrentValue(residuals.Get(i).GetY.SetFormat(\"d.ddd\"))\n      end\n    rmsErrors = av.Run(\"Transform.GetRMSError\",{srcPoints,desPoints,params})\n   
 txtSrcError.SetText(rmsErrors.Get(0).SetFormat(\"d.ddd\").AsString)\n    txtDesError.SetText(rmsErrors.Get(1).SetFormat(\"d.ddd\").AsString)\n    \n    p1 = 0@0\n    maxX = -1 / 0\n    maxY = -1 / 0\n    for each p in srcPoints\n      p1 = p1 + p\n      maxX = maxX max p.GetY\n      maxY = maxY max p.GetY\n      end\n    p1 = p1 / ((srcPoints.Count)@(srcPoints.Count))\n    delta = (maxX - p1.GetX) max (maxY - p1.GetY)\n    p2 = (p1.GetX + delta)@(p1.GetY + delta)\n    \n    tp1 = av.Run(\"Transform.Process\",{p1,params})\n    t
p2 = av.Run(\"Transform.Process\",{p2,params})\n    sca = tp1.Distance(tp2) / p1.Distance(p2)\n    txtScale.SetText(sca.SetFormat(\"d.ddd\").AsString)\n    \n    dp = tp2 - tp1\n    correction = -45\n    if (params.Count = 6) then\n      if (params.Get(4) < 0) then\n        correction = 45\n        end\n      end\n    rot = av.Run(\"Transform.Math.Atan2\",{dp.GetX,dp.GetY}).AsDegrees + correction\n    if (rot < 0) then\n      rot = rot + 360\n      end\n    if (rot >= 360) then\n      rot = rot - 360\n      end\n    txtRotation.Se
tText(rot.SetFormat(\"d.d\").AsString)\n    end\n  end\n\nlstCoords.GoRowColumn(curRow,0)\nconfig.Set(\"outParams\",params)\nav.Run(\"Transform.Tool.UpdateControls\",nil)\n\n\n"
)

(Script.23
	Name:	"Transform.Tool.Start"
	SourceCode:	"' -- get the view and dialog\n\nif (av.GetActiveDoc.Is(View).Not) then\n  return nil\n  end\n\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\n\n' -- create a dictionary to hold configuration data\n\nconfig = Dictionary.Make(7)\nconfig.Add(\"fullHeight\",nil)\nconfig.Add(\"tool\",nil)\nconfig.Add(\"sourceTheme\",nil)\nconfig.Add(\"sourceParams\",nil)\nconfig.Add(\"srcPoints\",nil)\nconfig.Add(\"desPoints\",nil)\nconfig.Add(\"outParams\",nil)\nconfig.Add(\"graphics\",nil)\n\n' -- store the current view and GUI tool in the configuration dic
tionary\n'_outputview = nil\ntheDialog.SetObjectTag(config)\ntheDialog.Open\n"
)

(Script.24
	Name:	"Transform.Tool.ToggleSize"
	SourceCode:	"'msgbox.info(\"Transform.Tool.ToggleSize\",\"\")\nreducedHeight = 70\n\ntheDialog = SELF.GetDialog\nfullHeight = theDialog.GetObjectTag.Get(\"fullHeight\")\n\narrowUpIcon = theDialog.FindByName(\"btnUpIcon\").GetIcon\narrowDownIcon = theDialog.FindByName(\"btnDownIcon\").GetIcon\n\nwidth = theDialog.ReturnExtent.GetWidth\nif (theDialog.ReturnExtent.GetHeight > reducedHeight) then\n  theDialog.Resize(width,reducedHeight)\n  SELF.SetIcon(arrowDownIcon)\n  SELF.SetHelp(\"Expand//Show the large form\")\nelse\n  theDialog.Resize(width,ful
lHeight)\n  SELF.SetIcon(arrowUpIcon)\n  SELF.SetHelp(\"Shrink//Show the small form\")\n  end\n"
)

(Script.25
	Name:	"Transform.Tool.Transform"
	SourceCode:	"\ntheDialog = SELF.GetDialog\nconfig = theDialog.GetObjectTag\nsourceTheme = config.Get(\"sourceTheme\")\noutParams   = config.Get(\"outParams\")\n\noutShapeName = FileName.GetCWD.ReturnDir.MakeTmp(\"transf\",\"shp\")\noutShapeName = FileDialog.Put(outShapeName,\"*.shp\",\"Save transformed theme as\")\nif (outShapeName = nil) then\n  return nil\n  end\n\ninFTab = sourceTheme.GetFTab\ninFields = inFTab.GetFields\nnumFields = inFields.Count\n\noutFTab = FTab.MakeNew(outShapeName,inFTab.GetShapeClass)\noutFTab.SetEditable(true)\noutFields 
= inFields.DeepClone\noutFields.Remove(0)\noutFTab.AddFields(outFields)\noutFields = outFTab.GetFields\n\nif (inFTab.GetSelection.Count = 0) then\n  inSel = inFTab\n  numRec = inFTab.GetNumRecords\nelse\n  inSel = inFTab.GetSelection\n  numRec = inSel.Count\n  end\n\nav.SetStatus(0)\nn = 0\n\nfor each inRec in inSel\n  s = inFTab.ReturnValue(inFields.Get(0),inRec)\n  if (s.Is(Point)) then\n    s = av.Run(\"Transform.Process\",{s,outParams})\n  else\n    s = inFTab.GetShapeClass.Make(av.Run(\"Transform.Process\",{s.AsList,outParams}
))\n    end\n  \n  outRec = outFTab.AddRecord\n  outFTab.SetValue(outFields.Get(0),outRec,s)\n  for each i in 1..(outFields.Count - 1)\n    v = inFTab.ReturnValue(inFields.Get(i),inRec)\n    outFTab.SetValue(outFields.Get(i),outRec,v)\n    end\n  \n  n = n + 1\n  av.SetStatus((n / numRec) * 100)\n  end\n\noutFTab.SetEditable(false)\n\nupdate = false\nif (av.GetActiveDoc.Is(View)) then\n  update = MsgBox.YesNoCancel(\"Add transformed shapefile as a theme to \" +\n      \"the active view?\",\"Transform Theme\",true)\n  if (update = ni
l) then\n    return nil\n    end\n  end\n  \nif (update) then\n  theView = av.GetActiveDoc\nelse\n  viewList = List.Make\n  for each d in av.GetProject.GetDocs\n    if (d.Is(View)) then\n      viewList.Add(d)\n      end\n    end\n  theView = MsgBox.List(viewList,\"Add transformed shapefile as a theme to this view\",\n      \"Transform Theme\")\n  if (theView = nil) then\n    return nil\n    end\n  end\n\nnewTheme = FTheme.Make(outFTab)\nnewTheme.SetLegend(sourceTheme.GetLegend.Clone)\nnewTheme.SetVisible(sourceTheme.IsVisible)\n\ntheVi
ew.AddTheme(newTheme)\nnewTheme.Invalidate(false)\n\n"
)

(Script.26
	Name:	"Transform.Tool.UpdateCAD"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nsourceTheme = theDialog.GetObjectTag.Get(\"sourceTheme\")\noutParams = theDialog.GetObjectTag.Get(\"outParams\")\n\nav.Run(\"Transform.Tool.WriteWorld\",true)\n\nupdate = false\n\nif (av.GetActiveDoc.Is(View)) then\n  update = MsgBox.YesNoCancel(\"Update the CAD theme in the active view?\",\n      \"Update CAD Theme\",true)\n  if (update = nil) then\n    return nil\n    end\n  end\n  \nif (update) then\n  theView = av.GetActiveDoc\nelse\n  viewList = List.Make\n  for each d in av.GetP
roject.GetDocs\n    if (d.Is(View)) then\n      viewList.Add(d)\n      end\n    end\n  theView = MsgBox.List(viewList,\"Update the CAD theme in this view\",\n      \"Update CAD Theme\")\n  if (theView = nil) then\n    return nil\n    end\n  end\n\nnewTheme = FTheme.Make(FTab.Make(sourceTheme.GetFTab.GetSrcName))\nnewTheme.SetLegend(sourceTheme.GetLegend.Clone)\nnewTheme.SetVisible(sourceTheme.IsVisible)\n\ni = theView.GetThemes.Find(sourceTheme)\nif (i > -1) then\n  theView.DeleteTheme(sourceTheme)\n  theView.AddTheme(newTheme)\n 
 theView.GetThemes.Shuffle(newTheme,i + 1)\n  theView.Invalidate\nelse\n  theView.AddTheme(newTheme)\n  newTheme.Invalidate(false)\n  end\n\ntheDialog.FindByName(\"lstCoords\").DefineFromList({})\n\ntheDialog.GetObjectTag.Set(\"sourceTheme\",newTheme)\ntheDialog.GetObjectTag.Set(\"sourceParams\",outParams)\ntheDialog.GetObjectTag.Set(\"srcPoints\",{})\ntheDialog.GetObjectTag.Set(\"desPoints\",{})\ntheDialog.GetObjectTag.Set(\"origpts\",{})\n\ntheDialog.GetObjectTag.Set(\"outParams\",nil)\n\nav.Run(\"Transform.Tool.ShowTransform\",nil)\nav.R
un(\"Transform.Tool.UpdateGraphics\",{\"clear\"})\n\n\n"
)

(Script.27
	Name:	"Transform.Tool.UpdateControls"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nsourceTheme = theDialog.GetObjectTag.Get(\"sourceTheme\")\noutParams = theDialog.GetObjectTag.Get(\"outParams\")\n\nbtnWriteWorld = theDialog.FindByName(\"btnWriteWorld\")\nbtnTransform = theDialog.FindByName(\"btnTransform\")\nbtnUpdate = theDialog.FindByName(\"btnUpdate\")\n\nbtnWriteWorld.SetEnabled(outParams <> nil)\nbtnTransform.SetEnabled((sourceTheme.Is(FTheme)) and (outParams <> nil))\nbtnUpdate.SetEnabled(false)\n\nif ((sourceTheme.Is(FTheme)) and (sourceTheme.GetFTab
.IsDrawing)) then\n  btnUpdate.SetEnabled((outParams <> nil) and\n      (theDialog.FindByName(\"optConformal\").IsSelected))\n  end\n\noptFill = theDialog.FindByName(\"optFill\")\noptEdit = theDialog.FindByName(\"optEdit\")\nlstCoords = theDialog.FindByName(\"lstCoords\")\n\noptEdit.SetEnabled(lstCoords.GetRowCount <> 0)\nif (optEdit.IsEnabled.Not) then\n  optFill.Select\n  end"
)

(Script.28
	Name:	"Transform.Tool.UpdateGraphics"
	SourceCode:	"\n' -- general symbology\n\nsrcColor = Color.GetRed\ndesColor = Color.GetBlue\nlnkColor = Color.GetMagenta\n\npointSym = BasicMarker.Make\npointSym.SetFont(Font.Make(\"ESRI Geometric Symbols\",\"Normal\"))\npointSym.SetCharacter(71)\npointSym.SetSize(12)\n\nlineSym = BasicPen.Make\nlineSym.SetSize(2)\n\ntextSym = TextSymbol.Make\ntextSym.SetFont(Font.MakeStandard(#FONT_HELV))\ntextSym.SetSize(12)\n\n' -- specific symbology\n\nsrcPointSym = pointSym.Clone\nsrcPointSym.SetColor(srcColor)\n\nsrcTextSym = textSym.Clone\nsrcTextSym.SetColor
(srcColor)\n\ndesPointSym = pointSym.Clone\ndesPointSym.SetColor(desColor)\n\ndesTextSym = textSym.Clone\ndesTextSym.SetColor(desColor)\n\nlnkLineSym = lineSym.Clone\nlnkLineSym.SetColor(lnkColor)\n\n' -- get the dialog\n\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\ntheGraphics = theDialog.GetObjectTag.Get(\"graphics\")\n\nif (SELF.Get(0) = \"update\") then\n  n = SELF.Get(1)\n  type = SELF.Get(2)\n  \n  if (n = theGraphics.Count) then\n    gl = nil\n    oldView = nil\n    regGraphics = {nil,nil,nil,nil,nil}\n    theGraphics.A
dd(regGraphics)\n  else\n    gl = theGraphics.Get(n).Get(4)\n    if (type = \"source\") then\n      oldView = theGraphics.Get(n).Get(0)\n    else\n      oldView = theGraphics.Get(n).Get(2)\n      end\n    av.Run(\"Transform.Tool.DeleteGraphics\",{n,type})\n    regGraphics = theGraphics.Get(n)\n    end\n    \n  if (type = \"link\") then\n    p1 = SELF.Get(3)\n    p2 = SELF.Get(4)\n    theView = av.Run(\"Transform.Tool.GetGraphicsView\",{SELF.Get(5),oldView})\n    if (theView = nil) then\n      return nil\n      end\n    \n    gl = Grap
hicShape.Make(Line.Make(p1,p2))\n    gl.SetSymbol(lnkLineSym)\n    theView.GetGraphics.Add(gl)\n  \n    gp = GraphicShape.Make(p1)\n    gp.SetSymbol(srcPointSym)\n    gt = GraphicText.Make(\"  \" + n.AsString,p1)\n    gt.SetSymbol(srcTextSym)\n    gg1 = GraphicGroup.Make\n    gg1.Add(gp)\n    gg1.Add(gt)\n    theView.GetGraphics.Add(gg1)\n\n    gp = GraphicShape.Make(p2)\n    gp.SetSymbol(desPointSym)\n    gt = GraphicText.Make(\"  \" + n.AsString,p2)\n    gt.SetSymbol(desTextSym)\n    gg2 = GraphicGroup.Make\n    gg2.Add(gp)\n  
  gg2.Add(gt)\n    theView.GetGraphics.Add(gg2)\n\n    regGraphics.Set(0,theView.GetName)\n    regGraphics.Set(1,gg1)\n    regGraphics.Set(2,theView.GetName)\n    regGraphics.Set(3,gg2)\n    regGraphics.Set(4,gl)\n    \n  else\n    p = SELF.Get(3)\n    theView = av.Run(\"Transform.Tool.GetGraphicsView\",{SELF.Get(4),oldView})\n    if (theView = nil) then\n      return nil\n      end\n   \n    if (type = \"source\") then\n      pointSym = srcPointSym\n      textsym = srcTextSym\n    else\n      pointSym = desPointSym\n      textsym 
= desTextSym\n      end\n\n    if (gl <> nil) then\n      l = gl.GetShape\n      if (type = \"source\") then\n        gl.SetShape(Line.Make(p,l.ReturnEnd))\n      else\n        gl.SetShape(Line.Make(l.ReturnStart,p))\n        end\n      theView.GetGraphics.Add(gl)\n      regGraphics.Set(4,gl)\n      end\n\n    gp = GraphicShape.Make(p)\n    gp.SetSymbol(pointSym)\n    gt = GraphicText.Make(\"  \" + n.AsString,p)\n    gt.SetSymbol(textSym)\n    gg = GraphicGroup.Make\n    gg.Add(gp)\n    gg.Add(gt)\n    theView.GetGraphics.Add(gg)\n 
   \n    if (type = \"source\") then\n      regGraphics.Set(0,theView.GetName)\n      regGraphics.Set(1,gg)\n    else\n      regGraphics.Set(2,theView.GetName)\n      regGraphics.Set(3,gg)\n      end\n    end\n  end\n  \nif (SELF.Get(0) = \"delete\") then\n  n = SELF.Get(1)\n  if (n <= (theGraphics.Count + 1)) then\n    av.Run(\"Transform.Tool.DeleteGraphics\",{n,\"link\"})\n    end\n  end\n\nif (SELF.Get(0) = \"clear\") then\n  if (theGraphics.Count >= 2) then\n    for each n in 1..(theGraphics.Count - 1)\n      av.Run(\"Transform.Tool.D
eleteGraphics\",{n,\"link\"})\n      end\n    end\n  theDialog.GetObjectTag.Set(\"graphics\",{nil})\n  end\n\n"
)

(Script.29
	Name:	"Transform.Tool.UpdateValue"
	SourceCode:	"\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\nsrcPoints = theDialog.GetObjectTag.Get(\"srcPoints\")\ndesPoints = theDialog.GetObjectTag.Get(\"desPoints\")\n'msgbox.listasstring(srcpoints,\"\",\"\")\nfmt = \"d.ddd\"\n\nval  = SELF.Get(0)\ntype = SELF.Get(1)\n\nlstCoords = theDialog.FindByName(\"lstCoords\")\nsrcX = 2\nsrcY = 3\ndesX = 5\ndesY = 6\n\ni = lstCoords.GetCurrentRow\n\nif (type = \"source X\") then\n  srcPoints.Get(i).SetX(val)\n  lstCoords.GoRowColumn(i,srcX)\n  lstCoords.SetCurrentValue(val.SetFormat(fmt))\n  end\n\nif (type
 = \"source Y\") then\n  srcPoints.Get(i).SetY(val)\n  lstCoords.GoRowColumn(i,srcY)\n  lstCoords.SetCurrentValue(val.SetFormat(fmt))\n  end\n\nif (type = \"source\") then\n  srcPoints.Set(i,val)\n  lstCoords.GoRowColumn(i,srcX)\n  lstCoords.SetCurrentValue(val.GetX.SetFormat(fmt))\n  lstCoords.GoRowColumn(i,srcY)\n  lstCoords.SetCurrentValue(val.GetY.SetFormat(fmt))\n  end\n\nif (type = \"destination X\") then\n  desPoints.Get(i).SetX(val)\n  lstCoords.GoRowColumn(i,desX)\n  lstCoords.SetCurrentValue(val.SetFormat(fmt))\n  end\n\ni
f (type = \"destination Y\") then\n  desPoints.Get(i).SetY(val)\n  lstCoords.GoRowColumn(i,desY)\n  lstCoords.SetCurrentValue(val.SetFormat(fmt))\n  end\n\nif (type = \"destination\") then\n  desPoints.Set(i,val)\n  lstCoords.GoRowColumn(i,desX)\n  lstCoords.SetCurrentValue(val.GetX.SetFormat(fmt))\n  lstCoords.GoRowColumn(i,desY)\n  lstCoords.SetCurrentValue(val.GetY.SetFormat(fmt))\n  end\n\n"
)

(Script.30
	Name:	"Transform.Tool.WriteWorld"
	SourceCode:	"force = false\nScript.The.SetNumberFormat( \"d.dddddddd\" )\n\nif (SELF.Is(Boolean)) then\n  force = SELF\n  end\n\ntheDialog = av.FindDialog(\"Transform.Tool.Dialog\")\noptConformal = theDialog.FindByName(\"optConformal\")\noptAffine = theDialog.FindByName(\"optAffine\")\nSCP = theDialog.FindByName(\"SCP\")\n\nconfig = theDialog.GetObjectTag\nsourceTheme  = config.Get(\"sourceTheme\")\nsourceParams = config.Get(\"sourceParams\")\nsrcPoints    = config.Get(\"srcPoints\")\ndesPoints    = config.Get(\"desPoints\")\noutParams    = config.Get(\"o
utParams\")\norigPoints   = config.Get(\"origpts\")\n\n'msgbox.listasstring(srcpoints,\"\",\"\")\n'msgbox.listasstring(despoints,\"\",\"\")\n'msgbox.info(srcpoints.get(0).getx,\"this is the x of this point\")\n'exit\n' -- build the world file name\n\ngcpfld = field.make(\"gcp\",#FIELD_DECIMAL,10,0)\nusefld = field.make(\"use_point\",#FIELD_CHAR,3,0)\nxfld = field.make(\"from_x\",#FIELD_DECIMAL,20,4)\nyfld = field.make(\"from_y\",#FIELD_DECIMAL,20,4)\ntoxfld = field.make(\"to_x\",#FIELD_DECIMAL,20,4)\ntoyfld = field.make(\"to_y\",#FIELD_DECIMAL,2
0,4)\nx_errorfld = field.make(\"x_error\",#FIELD_DECIMAL,20,4)\ny_errorfld = field.make(\"y_error\",#FIELD_DECIMAL,20,4)\n\n\n\nif (sourceTheme = nil) then\n  defFileName = FileName.GetCWD.ReturnDir.MakeTmp(\"transf\",\"wld\")\n  SCPfilename = FileName.GetCWD.ReturnDir.MakeTmp(\"transf\",\"pts\")\nelse\n  if (sourceTheme.Is(FTheme)) then\n    defFileName = sourceTheme.GetFTab.GetSrcName.GetFileName.Clone\n    defFileName.SetExtension(\"wld\")\n    SCPfilename = sourceTheme.GetFTab.GetSrcName.GetFileName.Clone\n    SCPfilename.SetExten
sion(\"pts\") \n    DBFfilename = sourceTheme.GetFTab.GetSrcName.GetFileName.Clone\n    DBFfilename.SetExtension(\"dbf\") \n  else\n    theISrc = sourceTheme.GetImgSrc\n    defFileName = theISrc.GetSrcName.GetFileName.Clone\n    SCPfilename = theISrc.GetSrcName.GetFileName.Clone\n    SCPfilename.SetExtension(\"pts\") \n    DBFfilename = theISrc.GetSrcName.GetFileName.Clone\n    DBFfilename.SetExtension(\"dbf\") \n\n    theExt = defFileName.GetExtension\n    if (theExt.Count <= 2) then\n      defFileName = (defFileName.AsString 
+ \"w\").AsFileName\n      theExt = defFileName.GetExtension\n    else\n      theExt = theExt.Left(1) + theExt.Right(1) + \"w\"\n      defFileName.SetExtension(theExt)\n      end\n    end\n  end\nif (force) then\n  worldFileName = defFileName\nelse\n\n  ' -- get the world file name from the user\n  \n  theExt = defFileName.GetExtension\n  if (theExt = \"\") then\n    theExt = \"*\"\n  end\n  \n  worldFileName = FileDialog.Put(defFileName,\"*.\" + theExt,\"Write World File\")\n  if (worldFileName = nil) then\n    return nil\n  end\n\n  if (scp
.isselected) then\n'    SCPFile = FileDialog.Put(SCPFileName,\"*.\" + theExt,\"Write out points\")\n'    if (SCPFile = nil) then\n'      return nil\n'    end\n    SCPFile = SCPFileName\n    scpLF = LineFile.Make(SCPFile,#FILE_PERM_WRITE)\n    outdbf = vtab.makenew(DBFfilename,DBASE)\n    if (outdbf.iseditable.not) then\n      outdbf.seteditable(true)\n    end \n    outdbf.addfields({gcpfld, usefld, xfld, yfld, toxfld, toyfld, x_errorfld, y_errorfld})\n    cntoff = srcpoints.count\n    for each heckler in 0..(srcpoints.count
 -1)\n      srcpt = srcpoints.get(heckler)\n      despt = desPoints.get(heckler)\n      opt = origpoints.get(heckler)\n      \n      \n      scpLF.writeelt(\"input:\"++\n      srcpt.getx.asstring++srcpt.gety.asstring++\n      \"|\"++\"output:\"++\n      despt.getx.asstring++despt.gety.asstring) \n\n      darec = outdbf.addrecord\n      outdbf.setvalue(outdbf.findfield(\"gcp\"),darec,cntoff)\n      outdbf.setvalue(outdbf.findfield(\"use_point\"),darec,\"on\")\n'      outdbf.setvalue(outdbf.findfield(\"from_x\"),darec,srcpt.getx)\n'     
 outdbf.setvalue(outdbf.findfield(\"from_y\"),darec,srcpt.gety)\n      outdbf.setvalue(outdbf.findfield(\"to_x\"),darec,despt.getx)\n      outdbf.setvalue(outdbf.findfield(\"to_y\"),darec,despt.gety)\n      outdbf.setvalue(outdbf.findfield(\"from_x\"),darec,opt.getx)\n      outdbf.setvalue(outdbf.findfield(\"from_y\"),darec,opt.gety)\n      cntoff = cntoff - 1\n\n    end\n    outdbf.seteditable(false)\n    scpLF.close\n  end  \n  ' -- check if the transformation type is appropriate for the data source\n  \n  if ((sourceTheme.Is(F
Theme)) and (sourceTheme.GetFTab.IsDrawing)) then\n    if ((optAffine.IsSelected) and (worldFileName.AsString = defFileName.AsString)) then\n      proceed = MsgBox.YesNo(\"You are about to create an affine world file for a \" +\n          \"CAD drawing.  This file will not register the drawing correctly.  Proceed?\",\n          \"Write World File\",false)\n      if (not proceed) then\n        return nil\n        end\n      end\n    end\n  \n  if (sourceTheme.Is(ITheme)) then\n    if ((optConformal.IsSelected) and (worldFileN
ame.AsString = defFileName.AsString)) then\n      proceed = MsgBox.YesNo(\"You are about to create a conformal world file for an \" +\n          \"image.  This file will not register the image correctly.  Proceed?\",\n          \"Write World File\",false)\n      if (not proceed) then\n        return nil\n        end\n      end\n    end\n  end\n\n' -- write the world file\nworldFile = LineFile.Make(worldFileName,#FILE_PERM_WRITE)\n\n' -- conformal/CAD world file\n\nif (theDialog.FindByName(\"optConformal\").IsSelected) then\n\n  ' --
 get the extent points from the source\n  \n  if (sourceTheme = nil) then\n    minX = 1 / 0\n    minY = 1 / 0\n    maxX = -1 / 0\n    maxY = -1 / 0\n    for each p in srcPoints\n      minX = minX min p.GetX\n      minY = minY min p.GetY\n      maxX = maxX max p.GetX\n      maxY = maxY max p.GetY\n    end\n    p1 = minX@minY\n    p2 = maxX@maxY\n  else\n    if (sourceTheme.Is(FTheme)) then\n      e = sourceTheme.ReturnExtent\n      p1 = (e.GetLeft)@(e.GetBottom)\n      p2 = (e.GetRight)@(e.GetTop)\n      if (sourceParams <> nil
) then\n        p1 = av.Run(\"Transform.Process\",{p1,sourceParams,false})\n        p2 = av.Run(\"Transform.Process\",{p2,sourceParams,false})\n      end\n    else\n      p1 = 0@0\n      p2 = (theISrc.GetNumColumns)@(theISrc.GetNumRows)\n    end\n  end\n\n  ' -- transform the extent points\n  \n  t1 = av.Run(\"Transform.Process\",{p1,outParams})\n  t2 = av.Run(\"Transform.Process\",{p2,outParams})\n  \n  ' -- write the coordinate pairs\n  \n  worldFile.WriteElt(p1.GetX.SetFormat(\"d.ddd\").AsString + \",\" +\n                     p1.Get
Y.SetFormat(\"d.ddd\").AsString + \" \" +\n                     t1.GetX.SetFormat(\"d.ddd\").AsString + \",\" +\n                     t1.GetY.SetFormat(\"d.ddd\").AsString)\n  worldFile.WriteElt(p2.GetX.SetFormat(\"d.ddd\").AsString + \",\" +\n                     p2.GetY.SetFormat(\"d.ddd\").AsString + \" \" +\n                     t2.GetX.SetFormat(\"d.ddd\").AsString + \",\" +\n                     t2.GetY.SetFormat(\"d.ddd\").AsString)\n\n' -- affine/image world file\n\nelse\n  for each i in {0,3,1,4,2,5}\n    p = outParams.Get(i).SetForm
at(\"d.dddddddddddddd\").AsString\n    worldFile.WriteElt((\"                     \" + p).Right(35))\n  end\nend\n\nworldFile.Close\nav.getactivedoc.deletetheme(sourceTheme)"
)

(AVDLog.31
	Name:	"Transform.Tool.Dialog"
	X:	57
	Y:	134
	W:	683
	H:	269
	ConstrainedControlNames:	32
	ConstrainedControlNames:	33
	ConstrainedControlNames:	34
	ConstrainedControlNames:	35
	ConstrainedControlNames:	36
	ConstrainedControlNames:	37
	ConstrainedControlNames:	38
	ConstrainedControlNames:	39
	ConstrainedControlNames:	40
	ConstrainedControlNames:	41
	ConstrainedControlNames:	42
	ConstrainedControlNames:	43
	ConstrainedControlNames:	44
	ConstrainedControlNames:	45
	ConstrainedControlNames:	46
	Constraints:	47
	Constraints:	48
	Constraints:	49
	Constraints:	50
	Constraints:	51
	Constraints:	52
	Constraints:	53
	Constraints:	54
	Constraints:	55
	Constraints:	56
	Constraints:	57
	Constraints:	58
	Constraints:	59
	Constraints:	60
	Constraints:	61
	Server:	62
	ControlPanel:	63
	ObjectTag:	160
	Title:	"Register and Transform (test version)"
	EscapeEnabled:	1
	AlwaysOnTop:	1
	HasTitleBar:	1
	Closeable:	1
	Close:	"Transform.Tool.Close"
	Open:	"Transform.Tool.Open"
	DefaultButton:	171
)

(AVStr.32
	S:	"btnWriteWorld"
)

(AVStr.33
	S:	"btnTransform"
)

(AVStr.34
	S:	"btnDelete"
)

(AVStr.35
	S:	"btnClear"
)

(AVStr.36
	S:	"btnUpdate"
)

(AVStr.37
	S:	"btnTheme"
)

(AVStr.38
	S:	"btnTest"
)

(AVStr.39
	S:	"btnToggleSize"
)

(AVStr.40
	S:	"btnUpIcon"
)

(AVStr.41
	S:	"btnDownIcon"
)

(AVStr.42
	S:	"btnSrcPoint"
)

(AVStr.43
	S:	"btnLink"
)

(AVStr.44
	S:	"btnDesPoint"
)

(AVStr.45
	S:	"ProjectPoint"
)

(AVStr.46
	S:	"DMS"
)

(Numb.47
	N:	85.00000000000000
)

(Numb.48
	N:	85.00000000000000
)

(Numb.49
	N:	85.00000000000000
)

(Numb.50
	N:	85.00000000000000
)

(Numb.51
	N:	85.00000000000000
)

(Numb.52
	N:	85.00000000000000
)

(Numb.53
	N:	85.00000000000000
)

(Numb.54
	N:	85.00000000000000
)

(Numb.55
	N:	85.00000000000000
)

(Numb.56
	N:	85.00000000000000
)

(Numb.57
	N:	85.00000000000000
)

(Numb.58
	N:	85.00000000000000
)

(Numb.59
	N:	85.00000000000000
)

(Numb.60
	N:	85.00000000000000
)

(Numb.61
	N:	85.00000000000000
)

(Nil.62
)

(CPanel.63
	Child:	64
	Child:	71
	Child:	78
	Child:	83
	Child:	90
	Child:	97
	Child:	99
	Child:	101
	Child:	102
	Child:	103
	Child:	105
	Child:	107
	Child:	108
	Child:	110
	Child:	111
	Child:	112
	Child:	114
	Child:	116
	Child:	117
	Child:	119
	Child:	121
	Child:	123
	Child:	124
	Child:	126
	Child:	128
	Child:	130
	Child:	132
	ResBox:	133
	ResBox:	134
	ResBox:	135
	ResBox:	136
	ResBox:	137
	ResBox:	138
	ResBox:	139
	ResBox:	140
	ResBox:	141
	ResBox:	142
	ResBox:	143
	ResBox:	144
	ResBox:	145
	ResBox:	146
	ResBox:	147
	ResBox:	148
	ResBox:	149
	ResBox:	150
	ResBox:	151
	ResBox:	152
	ResBox:	153
	ResBox:	154
	ResBox:	155
	ResBox:	156
	ResBox:	157
	ResBox:	158
	ResBox:	159
	Listening:	1
)

(CPanel.64
	InternalName:	"aControlPanel7"
	Child:	65
	Child:	66
	Child:	67
	Constraints:	0x55
	ResBox:	68
	ResBox:	69
	ResBox:	70
	Label:	" "
	Listening:	1
)

(TextLabel.65
	InternalName:	"aTextLabel5"
	Constraints:	0x55
	Label:	"Mode:"
	Listening:	1
)

(RButn.66
	InternalName:	"optFill"
	Constraints:	0x55
	Listening:	1
	Label:	"Fill"
)

(RButn.67
	InternalName:	"optEdit"
	Constraints:	0x55
	Listening:	1
	Label:	"Edit"
)

(RectD.68
	Left:	10.00000000000000
	Top:	27.00000000000000
	Right:	48.00000000000000
	Bottom:	13.00000000000000
)

(RectD.69
	Left:	47.00000000000000
	Top:	27.00000000000000
	Right:	91.00000000000000
	Bottom:	13.00000000000000
)

(RectD.70
	Left:	88.00000000000000
	Top:	27.00000000000000
	Right:	132.00000000000000
	Bottom:	13.00000000000000
)

(CPanel.71
	InternalName:	"aControlPanel6"
	Child:	72
	Child:	73
	Child:	74
	Constraints:	0x55
	ResBox:	75
	ResBox:	76
	ResBox:	77
	Label:	" "
	Listening:	1
)

(RButn.72
	InternalName:	"optConformal"
	Constraints:	0x55
	Listening:	1
	Label:	"Conformal"
)

(RButn.73
	InternalName:	"optAffine"
	Constraints:	0x55
	Listening:	1
	Label:	"Affine"
)

(TextLabel.74
	InternalName:	"aTextLabel25"
	Constraints:	0x55
	Label:	"Type:"
	Listening:	1
)

(RectD.75
	Left:	39.00000000000000
	Top:	25.00000000000000
	Right:	114.00000000000000
	Bottom:	11.00000000000000
)

(RectD.76
	Left:	115.00000000000000
	Top:	25.00000000000000
	Right:	170.00000000000000
	Bottom:	11.00000000000000
)

(RectD.77
	Left:	7.00000000000000
	Top:	25.00000000000000
	Right:	41.00000000000000
	Bottom:	11.00000000000000
)

(CPanel.78
	InternalName:	"aControlPanel37"
	Child:	79
	Child:	80
	Constraints:	0x55
	ResBox:	81
	ResBox:	82
	Label:	"  Residuals  "
	VisibleBorder:	1
	Listening:	1
)

(TextLabel.79
	InternalName:	"aTextLabel35"
	Constraints:	0x55
	Label:	"X"
	Listening:	1
)

(TextLabel.80
	InternalName:	"aTextLabel36"
	Constraints:	0x55
	Label:	"Y"
	Listening:	1
)

(RectD.81
	Left:	18.00000000000000
	Top:	33.00000000000000
	Right:	43.00000000000000
	Bottom:	16.00000000000000
)

(RectD.82
	Left:	109.00000000000000
	Top:	32.00000000000000
	Right:	134.00000000000000
	Bottom:	16.00000000000000
)

(CPanel.83
	InternalName:	"aControlPanel32"
	Child:	84
	Child:	86
	Constraints:	0x55
	ResBox:	88
	ResBox:	89
	Label:	"  Destination  "
	VisibleBorder:	1
	Listening:	1
)

(TextLine.84
	InternalName:	"txtDesX"
	Label:	"X"
	Constraints:	0x55
	Listening:	1
	TextType:	85
	NextControl:	62
)

(AVEnum.85
	Name:	"TEXTLINE_TYPE_REAL"
)

(TextLine.86
	InternalName:	"txtDesY"
	Label:	"Y"
	Constraints:	0x55
	Listening:	1
	TextType:	87
	NextControl:	62
)

(AVEnum.87
	Name:	"TEXTLINE_TYPE_REAL"
)

(RectD.88
	Left:	16.00000000000000
	Top:	35.00000000000000
	Right:	98.00000000000000
	Bottom:	15.00000000000000
)

(RectD.89
	Left:	108.00000000000000
	Top:	35.00000000000000
	Right:	190.00000000000000
	Bottom:	15.00000000000000
)

(CPanel.90
	InternalName:	"aControlPanel31"
	Child:	91
	Child:	93
	Constraints:	0x55
	ResBox:	95
	ResBox:	96
	Label:	"  Source  "
	VisibleBorder:	1
	Listening:	1
)

(TextLine.91
	InternalName:	"txtSrcX"
	Label:	"X"
	Constraints:	0x55
	Listening:	1
	TextType:	92
	NextControl:	62
)

(AVEnum.92
	Name:	"TEXTLINE_TYPE_REAL"
)

(TextLine.93
	InternalName:	"txtSrcY"
	Label:	"Y"
	Constraints:	0x55
	Listening:	1
	TextType:	94
	NextControl:	62
)

(AVEnum.94
	Name:	"TEXTLINE_TYPE_REAL"
)

(RectD.95
	Left:	13.00000000000000
	Top:	35.00000000000000
	Right:	95.00000000000000
	Bottom:	15.00000000000000
)

(RectD.96
	Left:	105.00000000000000
	Top:	35.00000000000000
	Right:	187.00000000000000
	Bottom:	15.00000000000000
)

(TextLine.97
	InternalName:	"txtSrcError"
	Label:	"RMS Error"
	Constraints:	0x55
	Listening:	1
	TextType:	98
	NextControl:	62
)

(AVEnum.98
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.99
	InternalName:	"txtDesError"
	Label:	"RMS Error"
	Constraints:	0x55
	Listening:	1
	TextType:	100
	NextControl:	62
)

(AVEnum.100
	Name:	"TEXTLINE_TYPE_ALL"
)

(LButn.101
	InternalName:	"btnWriteWorld"
	Label:	"Write World File"
)

(LButn.102
	InternalName:	"btnTransform"
	Label:	"Transform Theme"
)

(Tool.103
	InternalName:	"btnSrcPoint"
	Help:	" "
	HelpTopic:	" "
	Icon:	104
	Cursor:	"Cursors.Default"
)

(AVIcon.104
	Name:	"Source Point"
	Data:	4e442049 6d616765 00010010 00100000 
	Data:	0300c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00ff0000 
	Data:	ff0000ff 0000ffc0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 0000ffc0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 00ffc0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c00000 
	Data:	ff0000ff c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c00000 
	Data:	ff0000ff c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 0000ffc0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 00ffc0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00ff0000 
	Data:	ff0000ff 0000ffc0 c0c0c0c0 c0c0c0c0 
	Data:	0000ff00 00ff0000 ffc0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c00000ff 
	Data:	c0c0c0c0 c0c0c0c0 c00000ff c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c00000 ffc0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c000 00ffc0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	0000ffc0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c00000ff 
	Data:	c0c0c0c0 c0c0c0c0 c00000ff c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	0000ff00 00ff0000 ffc0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c00000 00000001 00180007 00200001 
	Data:	00020000 00000000 0000
)

(Tool.105
	InternalName:	"btnLink"
	Help:	" "
	Icon:	106
	Cursor:	"Cursors.Default"
)

(AVIcon.106
	Name:	"Link Points"
	Data:	4e442049 6d616765 00010010 00100000 
	Data:	0300c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00ff0000 
	Data:	ff0000ff 0000ffc0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 0000ffc0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 00ffc0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c00000 
	Data:	ff0000ff c0c0c0c0 c0c00000 ffc0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c00000 
	Data:	ff0000ff ff00ffc0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c00000ff c0c0c0c0 c0c0c0c0 
	Data:	c0ff00ff ff00ffff 00ffc0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 0000ffc0 c0c0c0c0 
	Data:	c0c0c0c0 ff00ffff 00ffff00 ffc0c0c0 
	Data:	c0c0c0ff 0000ff00 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00ff0000 
	Data:	ffc0c0c0 c0c0c0ff 00ffff00 ffff00ff 
	Data:	c0c0c0c0 c0c0c0c0 c0ff0000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0ff00 ffff00ff 
	Data:	ff00ffc0 c0c0c0c0 c0c0c0c0 ff0000c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff00ff 
	Data:	ff0000ff 0000c0c0 c0c0c0c0 ff0000c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0ff 0000c0c0 c0c0c0c0 
	Data:	ff0000ff 0000c0c0 c0c0c0c0 ff0000c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0ff 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 ff0000c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0ff00 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0ff0000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	ff0000ff 0000ff00 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c00000 00000001 00180007 00200001 
	Data:	00020000 00000000 0000
)

(LButn.107
	InternalName:	"btnDelete"
	Label:	"Delete"
)

(AVLBox.108
	InternalName:	"lstCoords"
	NextControl:	62
	ContentKind:	4
	Constraints:	0x55
	ColumnCount:	1
	Listening:	1
	VerticalScroll:	1
	SelectionStyle:	109
)

(AVEnum.109
	Name:	"LISTBOX_SELECTION_SINGLEROW"
)

(LButn.110
	InternalName:	"btnClear"
	Label:	"Clear"
)

(LButn.111
	InternalName:	"btnUpdate"
	Label:	"Update CAD Theme"
)

(TextLine.112
	InternalName:	"txtScale"
	Label:	"Scale"
	Constraints:	0x55
	Listening:	1
	TextType:	113
	NextControl:	62
)

(AVEnum.113
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.114
	InternalName:	"txtRotation"
	Label:	"Rotation"
	Constraints:	0x55
	Listening:	1
	TextType:	115
	NextControl:	62
)

(AVEnum.115
	Name:	"TEXTLINE_TYPE_ALL"
)

(LButn.116
	InternalName:	"btnTheme"
	Label:	"Source"
)

(TextLine.117
	InternalName:	"txtTheme"
	Label:	" "
	Constraints:	0x55
	Listening:	1
	ReadOnly:	1
	TextType:	118
	NextControl:	62
)

(AVEnum.118
	Name:	"TEXTLINE_TYPE_ALL"
)

(Tool.119
	InternalName:	"btnDesPoint"
	Icon:	120
	Cursor:	"Cursors.Default"
)

(AVIcon.120
	Name:	"Destination Point"
	Data:	4e442049 6d616765 00010010 00100000 
	Data:	0300c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0ff 0000ff00 
	Data:	00ff0000 ff0000c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 ff0000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0ff 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0ff0000 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0ff00 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0ff0000 c0c0c0c0 c0c0ff00 
	Data:	00ff0000 c0c0c0c0 c0c0ff00 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0ff0000 c0c0c0c0 c0c0ff00 
	Data:	00ff0000 c0c0c0c0 c0c0ff00 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0ff0000 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0ff00 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 ff0000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0ff 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0ff 0000ff00 
	Data:	00ff0000 ff0000c0 c0c0c0c0 c0ff0000 
	Data:	ff0000ff 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	c0c0c0c0 c0c0ff00 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	c0c0c0c0 c0c0c0c0 c0ff0000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	c0c0c0c0 c0c0c0c0 c0ff0000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	c0c0c0c0 c0c0c0c0 c0ff0000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	c0c0c0c0 c0c0ff00 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0ff0000 
	Data:	ff0000ff 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c00000 00000001 00180007 00200001 
	Data:	00020000 00000000 0000
)

(Butn.121
	InternalName:	"btnToggleSize"
	Icon:	122
)

(AVIcon.122
	Name:	"Empty"
	Res:	"AVIcon.Empty"

)

(LButn.123
	InternalName:	"btnTest"
	Label:	"Test"
)

(Butn.124
	InternalName:	"btnUpIcon"
	Invisible:	1
	Icon:	125
)

(AVIcon.125
	Name:	"Arrow Up"
	Data:	4e442049 6d616765 00010010 00100000 
	Data:	0300c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0000000 000000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c00000 00000000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 00000000 0000c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c000 00000000 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00000000 
	Data:	00c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	00000000 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c00000 
	Data:	00000000 c0c0c0c0 c0c0c0c0 c0000000 
	Data:	000000c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0000000 000000c0 c0c00000 00000000 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 00000000 00000000 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0000000 000000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c00000 00000000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 00000000 0000c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c000 00000000 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00000000 
	Data:	00c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	00000000 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c00000 
	Data:	00000000 c0c0c0c0 c0c0c0c0 c0000000 
	Data:	000000c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0000000 000000c0 c0c00000 00000000 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 00000000 00000000 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c00000 00000001 00180007 00200001 
	Data:	00020000 00000000 0000
)

(Butn.126
	InternalName:	"btnDownIcon"
	Invisible:	1
	Icon:	127
)

(AVIcon.127
	Name:	"Arrow Down"
	Data:	4e442049 6d616765 00010010 00100000 
	Data:	0300c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 00000000 00000000 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0000000 000000c0 c0c00000 00000000 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c00000 
	Data:	00000000 c0c0c0c0 c0c0c0c0 c0000000 
	Data:	000000c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00000000 
	Data:	00c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	00000000 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 00000000 0000c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c000 00000000 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0000000 000000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c00000 00000000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c000 0000c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 00000000 00000000 00c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0000000 000000c0 c0c00000 00000000 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c00000 
	Data:	00000000 c0c0c0c0 c0c0c0c0 c0000000 
	Data:	000000c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c000 00000000 
	Data:	00c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	00000000 0000c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 00000000 0000c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c000 00000000 00c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0000000 000000c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c00000 00000000 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c0c0c0 c0c0c0c0 c0c0c0c0 c0c0c0c0 
	Data:	c0c00000 00000001 00180007 00200001 
	Data:	00020000 00000000 0000
)

(Tool.128
	InternalName:	"ProjectPoint"
	Icon:	129
	Cursor:	"Cursors.Default"
)

(AVIcon.129
	Name:	"P"
	Res:	"Icons.P"

)

(Tool.130
	InternalName:	"DMS"
	Icon:	131
	Cursor:	"Cursors.Default"
)

(AVIcon.131
	Name:	"AddMatch"
	Res:	"Icons.AddMatch"

)

(AVCBox.132
	InternalName:	"SCP"
	Listening:	1
	Label:	"Store Control Points "
	Constraints:	0x55
)

(RectD.133
	Left:	318.00000000000000
	Top:	35.00000000000000
	Right:	456.00000000000000
	Bottom:	2.00000000000000
)

(RectD.134
	Left:	137.00000000000000
	Top:	36.00000000000000
	Right:	310.00000000000000
	Bottom:	3.00000000000000
)

(RectD.135
	Left:	466.00000000000000
	Top:	112.00000000000000
	Right:	668.00000000000000
	Bottom:	39.00000000000000
)

(RectD.136
	Left:	255.00000000000000
	Top:	112.00000000000000
	Right:	457.00000000000000
	Bottom:	39.00000000000000
)

(RectD.137
	Left:	44.00000000000000
	Top:	112.00000000000000
	Right:	246.00000000000000
	Bottom:	40.00000000000000
)

(RectD.138
	Left:	54.00000000000000
	Top:	229.00000000000000
	Right:	188.00000000000000
	Bottom:	209.00000000000000
)

(RectD.139
	Left:	327.00000000000000
	Top:	230.00000000000000
	Right:	461.00000000000000
	Bottom:	210.00000000000000
)

(RectD.140
	Left:	355.00000000000000
	Top:	263.00000000000000
	Right:	447.00000000000000
	Bottom:	239.00000000000000
)

(RectD.141
	Left:	460.00000000000000
	Top:	263.00000000000000
	Right:	552.00000000000000
	Bottom:	239.00000000000000
)

(RectD.142
	Left:	61.00000000000000
	Top:	36.00000000000000
	Right:	86.00000000000000
	Bottom:	12.00000000000000
)

(RectD.143
	Left:	85.00000000000000
	Top:	36.00000000000000
	Right:	110.00000000000000
	Bottom:	12.00000000000000
)

(RectD.144
	Left:	76.00000000000000
	Top:	262.00000000000000
	Right:	124.00000000000000
	Bottom:	238.00000000000000
)

(RectD.145
	Left:	10.00000000000000
	Top:	204.00000000000000
	Right:	677.00000000000000
	Bottom:	80.00000000000000
)

(RectD.146
	Left:	133.00000000000000
	Top:	262.00000000000000
	Right:	181.00000000000000
	Bottom:	238.00000000000000
)

(RectD.147
	Left:	564.00000000000000
	Top:	262.00000000000000
	Right:	671.00000000000000
	Bottom:	238.00000000000000
)

(RectD.148
	Left:	477.00000000000000
	Top:	230.00000000000000
	Right:	560.00000000000000
	Bottom:	210.00000000000000
)

(RectD.149
	Left:	571.00000000000000
	Top:	230.00000000000000
	Right:	668.00000000000000
	Bottom:	210.00000000000000
)

(RectD.150
	Left:	460.00000000000000
	Top:	32.00000000000000
	Right:	516.00000000000000
	Bottom:	13.00000000000000
)

(RectD.151
	Left:	511.00000000000000
	Top:	33.00000000000000
	Right:	646.00000000000000
	Bottom:	13.00000000000000
)

(RectD.152
	Left:	109.00000000000000
	Top:	36.00000000000000
	Right:	134.00000000000000
	Bottom:	12.00000000000000
)

(RectD.153
	Left:	649.00000000000000
	Top:	34.00000000000000
	Right:	673.00000000000000
	Bottom:	10.00000000000000
)

(RectD.154
	Left:	18.00000000000000
	Top:	262.00000000000000
	Right:	66.00000000000000
	Bottom:	238.00000000000000
)

(RectD.155
	Left:	678.00000000000000
	Top:	47.00000000000000
	Right:	690.00000000000000
	Bottom:	35.00000000000000
)

(RectD.156
	Left:	678.00000000000000
	Top:	59.00000000000000
	Right:	690.00000000000000
	Bottom:	47.00000000000000
)

(RectD.157
	Left:	36.00000000000000
	Top:	36.00000000000000
	Right:	61.00000000000000
	Bottom:	12.00000000000000
)

(RectD.158
	Left:	11.00000000000000
	Top:	36.00000000000000
	Right:	36.00000000000000
	Bottom:	12.00000000000000
)

(RectD.159
	Left:	220.00000000000000
	Top:	264.00000000000000
	Right:	339.00000000000000
	Bottom:	234.00000000000000
)

(AVDict.160
	Key:	161
	Key:	162
	Key:	163
	Key:	164
	Key:	165
	Key:	166
	Key:	167
	Key:	168
	Key:	169
	Value:	170
	Value:	170
	Value:	170
	Value:	170
	Value:	170
	Value:	170
	Value:	170
	Value:	170
	Value:	170
)

(AVStr.161
	S:	"fullHeight"
)

(AVStr.162
	S:	"sourceTheme"
)

(AVStr.163
	S:	"origPts"
)

(AVStr.164
	S:	"graphics"
)

(AVStr.165
	S:	"sourceParams"
)

(AVStr.166
	S:	"desPoints"
)

(AVStr.167
	S:	"outParams"
)

(AVStr.168
	S:	"srcPoints"
)

(AVStr.169
	S:	"tool"
)

(Nil.170
)

(Nil.171
)

(AVDLog.172
	Name:	"geographic_pt_projector"
	X:	59
	Y:	115
	W:	454
	H:	143
	ConstrainedControlNames:	173
	ConstrainedControlNames:	174
	Constraints:	175
	Constraints:	176
	Server:	62
	ControlPanel:	177
	Title:	"Geographic point projector"
	EscapeEnabled:	1
	Modal:	1
	Resizable:	1
	AlwaysOnTop:	1
	HasTitleBar:	1
	Closeable:	1
	DefaultButton:	204
)

(AVStr.173
	S:	"apply"
)

(AVStr.174
	S:	"cancel"
)

(Numb.175
	N:	85.00000000000000
)

(Numb.176
	N:	85.00000000000000
)

(CPanel.177
	Child:	178
	Child:	194
	Child:	198
	Child:	199
	ResBox:	200
	ResBox:	201
	ResBox:	202
	ResBox:	203
	Listening:	1
)

(CPanel.178
	InternalName:	"xcoord"
	Child:	179
	Child:	181
	Child:	183
	Constraints:	0x55
	ResBox:	191
	ResBox:	192
	ResBox:	193
	Label:	"X Coordinate"
	VisibleBorder:	1
	Listening:	1
)

(TextLine.179
	InternalName:	"x_d"
	Label:	"Degrees:"
	Constraints:	0x55
	Listening:	1
	TextType:	180
	NextControl:	181
)

(AVEnum.180
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.181
	InternalName:	"x_m"
	Label:	"Minutes:"
	Constraints:	0x55
	Listening:	1
	TextType:	182
	NextControl:	183
)

(AVEnum.182
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.183
	InternalName:	"x_s"
	Label:	"Seconds:"
	Constraints:	0x55
	Listening:	1
	TextType:	184
	NextControl:	185
)

(AVEnum.184
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.185
	InternalName:	"y_d"
	Text:	"-"
	Label:	"Degrees:"
	Constraints:	0x55
	Listening:	1
	TextType:	186
	NextControl:	187
)

(AVEnum.186
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.187
	InternalName:	"y_m"
	Label:	"Minutes:"
	Constraints:	0x55
	Listening:	1
	TextType:	188
	NextControl:	189
)

(AVEnum.188
	Name:	"TEXTLINE_TYPE_ALL"
)

(TextLine.189
	InternalName:	"y_s"
	Label:	"Seconds:"
	Constraints:	0x55
	Listening:	1
	TextType:	190
	NextControl:	62
)

(AVEnum.190
	Name:	"TEXTLINE_TYPE_ALL"
)

(RectD.191
	Left:	9.00000000000000
	Top:	38.00000000000000
	Right:	139.00000000000000
	Bottom:	18.00000000000000
)

(RectD.192
	Left:	147.00000000000000
	Top:	36.00000000000000
	Right:	272.00000000000000
	Bottom:	16.00000000000000
)

(RectD.193
	Left:	282.00000000000000
	Top:	36.00000000000000
	Right:	426.00000000000000
	Bottom:	16.00000000000000
)

(CPanel.194
	InternalName:	"aControlPanel8"
	Child:	185
	Child:	187
	Child:	189
	Constraints:	0x55
	ResBox:	195
	ResBox:	196
	ResBox:	197
	Label:	"Y Coordinate"
	VisibleBorder:	1
	Listening:	1
)

(RectD.195
	Left:	8.00000000000000
	Top:	38.00000000000000
	Right:	133.00000000000000
	Bottom:	18.00000000000000
)

(RectD.196
	Left:	145.00000000000000
	Top:	37.00000000000000
	Right:	283.00000000000000
	Bottom:	17.00000000000000
)

(RectD.197
	Left:	292.00000000000000
	Top:	36.00000000000000
	Right:	432.00000000000000
	Bottom:	16.00000000000000
)

(LButn.198
	InternalName:	"apply"
	Label:	"Apply"
	Click:	"Transform.geographic_project_point"
)

(LButn.199
	InternalName:	"cancel"
	Label:	"Cancel"
	Click:	"Transform.geographic_project_point"
)

(RectD.200
	Left:	7.00000000000000
	Top:	49.00000000000000
	Right:	447.00000000000000
	Bottom:	3.00000000000000
)

(RectD.201
	Left:	7.00000000000000
	Top:	103.00000000000000
	Right:	452.00000000000000
	Bottom:	53.00000000000000
)

(RectD.202
	Left:	278.00000000000000
	Top:	131.00000000000000
	Right:	367.00000000000000
	Bottom:	108.00000000000000
)

(RectD.203
	Left:	73.00000000000000
	Top:	133.00000000000000
	Right:	166.00000000000000
	Bottom:	110.00000000000000
)

(Nil.204
)

(Script.205
	Name:	"Transform_CanUnload"
	SourceCode:	"\nreturn (System.CanUnloadLibrary(SELF.GetDependencies.Get(0)))"
)

(Script.206
	Name:	"Transform_Unload"
	SourceCode:	"\nDialog.DetachFromExtension(SELF)"
)

(Script.207
	Name:	"Transform_Install"
	SourceCode:	"\n' -- install only if there is an active project\n\nif (av.GetProject = nil) then\n  return nil\n  end\n\n' -- install the controls under the View>View pulldown\n\ntheGUI = av.GetProject.FindGUI(\"View\")\nif (theGUI = nil) then\n  return nil\n  end\n\ntheMenu = theGUI.GetMenuBar.GetControls.Get(2)\ntheMenu.Add(SELF.Get(0),theMenu.GetControls.Count)\ntheMenu.Add(SELF.Get(1),theMenu.GetControls.Count)\ntheGUI.SetModified(true)\n\n' -- install the scripts\nfor each i in 2..(SELF.Count - 3)\n  av.GetProject.AddScript(SELF.Get(i))\ne
nd"
)

(Script.208
	Name:	"Transform_Uninstall"
	SourceCode:	"\n' -- uninstall only if there is an active project\n\nif (av.GetProject = nil) then\n  return nil\n  end\n\n' -- don't uninstall extension objects if project is closing\n\nif (av.GetProject.IsClosing) then\n  return nil\n  end\n\n' -- uninstall menus choices\n\ntheGUI = av.GetProject.FindGUI(\"View\")\nif (theGUI <> nil) then\n  theGUI.GetMenuBar.GetControls.Get(2).Remove(SELF.Get(0))\n  theGUI.GetMenuBar.GetControls.Get(2).Remove(SELF.Get(1))\n  end\n\n' -- uninstall scripts\n\nfor each i in 2..(SELF.Count - 2)\n  av.GetProject.Re
moveScript(SELF.Get(i).GetName)\n  end\n"
)

