/3.0 (Extension.1 Name: "Image Mover" FirstRootClassName: "List" Roots: 2 Roots: 3 Roots: 12 Roots: 13 Roots: 14 Roots: 15 Roots: 16 Version: 30 About: "This is an extension for moving active image themes in a view" InstallScript: 17 UninstallScript: 18 ExtVersion: 3 ) (List.2 ) (List.3 Child: 4 ) (List.4 Child: 5 Child: 9 Child: 11 ) (List.5 Child: 6 Child: 7 Child: 8 ) (AVStr.6 S: "View" ) (AVStr.7 S: "ToolBar" ) (AVStr.8 S: "InkGetImageMovePts" ) (Tool.9 Icon: 10 Cursor: "Cursors.Target" Apply: "InkGetImageMovePts" ) (AVIcon.10 Name: "spadd.bmp" Data: 4e442049 6d616765 00010012 000f0000 Data: 012cf9f9 f9f9f9f9 f9f9f9f9 f9f9f9f9 Data: f9f9f9f9 205cf9f9 f9f9f900 f9f9f9f9 Data: f9f9f9f9 f9f9f9f9 5c5cf9f9 f9f9f900 Data: 00f9f9f9 f9f9f9f9 f9f9f9f9 5c62f9f9 Data: f9f9f900 f900f9f9 f9f9f9f9 f9f9f9f9 Data: 6272f9f9 f9f9f900 f9f90007 000700f9 Data: f9f9f9f9 6272f9f9 f9f9f900 f9f90700 Data: ff00ff00 f9f9f9f9 6272f9f9 f9f9f900 Data: f9f900ff 00ff00ff 0007f9f9 6570f9f9 Data: f9f90000 00f9f900 ff00ff00 ff00f9f9 Data: 0000f9f9 f9000000 0000f9f9 00ff00ff Data: 0007f9f9 0000f9f9 00000000 000000f9 Data: f9000700 07f9f9f9 0000f9f9 00ff0000 Data: 000000f9 f9f9f9f9 f9f9f9f9 0000f9f9 Data: 0000ff00 000000f9 f9f9f9f9 f9f9f9f9 Data: 0000f9f9 f9000000 0000f9f9 f9f9f9f9 Data: f9f9f9f9 0300f9f9 07f90000 00f9f9f9 Data: f9f9f9f9 f9f9f9f9 0000f9f9 f9f9f9f9 Data: f9f9f9f9 f9f9f9f9 f9f9f9f9 5d000000 Data: 04000000 00000000 80000080 00000080 Data: 80008000 00008000 80008080 0000c0c0 Data: c000c0dc c000f0c8 a400ffff 80008080 Data: 400000ff 80000040 400080ff ff000080 Data: ff008080 ff000040 8000ff00 80004000 Data: 8000ff80 40008040 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 0000f0fb ff00a4a0 Data: a0008080 80000000 ff0000ff 000000ff Data: ff00ff00 0000ff00 ff00ffff 0000ffff Data: ff000002 00080007 00200001 00020000 Data: 00000000 0000 ) (Numb.11 N: 18.00000000000000 ) (List.12 ) (List.13 ) (Script.14 Name: "InkGetImageMovePts" SourceCode: "'InkGetImageMovePts\n\ntheView = av.GetActiveDoc\nIf (_isOrthoPoint2=false) then\n _isOrthoPoint2=true\n _i1 = theView.GetDisplay.ReturnUserPoint\n i1x=_i1.Getx.SetFormat(\"d.dddd\")\n i1y=_i1.Gety.SetFormat(\"d.dddd\")\n _i1xy=i1x.AsString+\",\"+i1y.AsString\n 'msgbox.Report(_i1xy,\"the coordinates of point 1 in orthophotos space\")\nelse\n _isOrthoPoint2=false\n 'this script gets the 2nd point in the ortho view\n _i2 = theView.GetDisplay.ReturnUserPoint\n i2x=_i2.Getx.SetFormat(\"d.dddd\")\n i2y=_i2.Gety.SetFormat(\"d.d ddd\")\n _i2xy=i2x.AsString+\",\"+i2y.AsString\n 'msgbox.Report(_i2xy,\"the coordinates of point 2 in orthophotos space\")\n av.Run(\"InkMoveImageRect\",{})\nend\n" ) (Script.15 Name: "InkMoveImageRect" SourceCode: "'InkMoveImageRect\n'script that uses an active image theme\n'and moves it based on 2 from/to pnts\n\ntheView=av.GetActiveDoc\ntheActiveImageThemes=theView.GetActiveThemes\nIf (theActiveImageThemes.Count=0) then\n msgbox.error(\"No Image themes Active. Review your Active theme selections and try again\",\"Ooops!!!\")\n exit\nend\nfor each theTheme in theActiveImageThemes\n If (theTheme.GetClass.GetClassName<>\"ITheme\") then\n msgbox.error(\"This function only works on image themes, Review your Active theme selections a nd try again\",\"Ooops!!!\")\n exit\n end\n'theTheme=theView.GetActiveThemes.Get(0)\n\n 'get the rectangle of extents\n theExtent=theTheme.ReturnExtent\n\n 'determine the delta x and y\n '_i1 and _i2 are the two points\n deltaX=_i2.GetX-_i1.GetX\n deltaY=_i2.GetY-_i1.GetY\n moveX=deltaX\n moveY=deltaY\n 'move the rect\n theNewExtent=theExtent.Move (moveX, moveY)\n\n 'Set the extents to the new location\n theTheme.GetImgSrc.SetMapExtent(theNewExtent)\nend\ntheView.Invalidate\n\n" ) (Script.16 Name: "InkStartImage" SourceCode: "'InkStartImage\n_i1xy=\" \"\n_i2xy=\" \"\n_i1 = point.make(0,0)\n_i2 = point.make(0,0)\n_isOrthoPoint2=false\n" ) (Script.17 Name: "My Extension Install" SourceCode: "'DO NOT EDIT!!!\n\nif (av.getproject=nil) then return(nil) end\n\n\ntheDocs = SELF.get(0)\ntheControlList = SELF.get(1)\ntheMenuList = SELF.get(2)\ntheToolMenuList=SELF.Get(3)\ntheProject=Av.getproject\n\n\n'Add the Docs\n'\nfor each adoc in theDocs\n theProject.addDoc(adoc)\nend\n\n'Add the Controls\n'\nfor each totalControl in theControlList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n \n 'Add the control to the control set\n theControlSet.Add(theControl,theCindex )\nend\n\n\n'Add the menus\nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0)\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the c urrent project.\",\"Script Eror\")\n return(nil)\n end\n \n theMbar=av.getproject.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n themenu=menu.make\n themenu.setlabel(mMenu)\n theMbar.add(themenu,999)\n end\n \n themenu.add(thecontrol, theCindex)\nend\n \n \n'Add the Tool Menus\n\nfor each totalControl in theToolMenuList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = totalControl.get(1)\n \n 'The con trol Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=av.getproject.findGUI(aControl.get(0)).GetToolBa r\n \n 'Add the control to the control set\n theControlSet.Add(theControl,theCindex)\nend\n\n\nav.getproject.setmodified(true)\n\n\n'And the scripts add themselves\nav.Run(\"InkStartImage\",{})\n" ) (Script.18 Name: "My Extension Uninstall" SourceCode: "'DO NOT EDIT!!!\n\n'The SELF is the Extension\n\ntheDocs = SELF.get(0)\ntheControlList = SELF.get(1)\ntheMenuList = SELF.get(2)\ntheToolMenuList=SELF.get(3)\ntheProject=Av.getproject\n\n\n'Add the Docs\n'\nfor each adoc in theDocs\n If (theProject.finddoc(adoc.getname)<>NIL) then \n theAnswer=msgbox.yesno(\"Remove the Document \"+adoc.getname+\"?\",\"Remove Document?\",TRUE)\n if (theAnswer=TRUE) then theProject.RemoveDoc(adoc) end\n end\nend\n\n'Removethe Controls\n'\nfor each totalControl in theControlList\n 'Get the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiate control set\n thecommand= \"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n\n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n theControlSet.remove(theControl)\n if (thecontrol = \"ToolBar\") then\n theControlSet.selectdefault\n end\n end\nend\n\n\n'Remove the Menus\n'\nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0 )\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n theMbar=av.getproject.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n MsgBox.Warning(\"The menu named \"+mMenu+\" is not here.\",\"Script Eror\")\n 'return(nil)\n else\n \n thething=themenu.getcontrols.find(thecontrol)\n if (thething<>NIL) then \n themenu.remove(thecontrol) \n end\n 'msgbox.info(themenu.GetControls.count.asstring,\"\")\n if (themenu.GetControls.count<1) then\n theMbar.remove(themenu)\n end\n end\nend\n \nfor each totalControl in theToolMenuList\n 'Get the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiate control set\n thecontrolset=av.getp roject.findGUI(aControl.get(0)).GetToolBar\n\n \n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n \n theControlSet.remove(theControl)\n theControlSet.selectdefault\n end\n\nend\n \n\n'And the scripts delete themselves\n\n\nav.getproject.setmodified(true)\n" )