/3.1 (Extension.1 Name: "TIFF 6.0 Image Support" Dependencies: "$AVBIN/tif6.dll\n" FirstRootClassName: "Script" Roots: 2 Version: 31 About: "Extends ArcView to support TIFF 6.0 images (v3.2)." LoadScript: 3 CanUnloadScript: 4 UnloadScript: 5 ExtVersion: 3100 ) (Script.2 Name: "TIFF.ObjectsPresent" SourceCode: "theProject = av.GetProject\nif (theProject = NIL) then\n return FALSE\nend\n\nfor each e in Clipboard.The\n if (e.Is(ITheme)) then\n theImgSrc = e.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"etf\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n elseif (e.Is(ViewFrame) and e.IsF illed) then\n for each aTheme in e.GetView.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgSrc = aTheme.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"etf\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n end\n end\n else if (e.Is(PictureFrame) and e.IsFilled and e.IsFilledBy(FileName)) then\n theFillObj = e.GetFillObject\n if (ISrc.IsValidFileName(theFillObj)) then\n theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n end\nend\ntheDocs = av.GetProject.GetDocs\nfor each aDoc in theDocs\n if (aDoc.Is(View)) then\n for each aTheme in aDoc.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgSrc = aTheme .GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"etf\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n end\n end\n elseif (aDoc.Is(Layout)) then\n for each aGraphic in aDoc.GetGraphics\n if (aGraphic.Is(PictureFrame) and aGraphi c.IsFilled and aGraphic.IsFilledBy(FileName)) then\n theFillObj = aGraphic.GetFillObject\n if (ISrc.IsValidFileName(theFillObj)) then\n theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n elseif (aGraphic.Is(ViewFrame) and aGraphic.IsFilled) then\n for each aTheme in aGraphic.GetView.GetThemes\n if (aTheme.Is(ITheme)) then\n theImgS rc = aTheme.GetImgSrc\n theSrcName = theImgSrc.GetSrcName\n if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"etf\"))) then\n return TRUE\n end\n else\n if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"etf\")) then\n return TRUE\n end\n end\n end\n end\n end\n end\n end\nend\n\nreturn FALSE\n\n\n\n\n\n" ) (Script.3 Name: "TIFF.Load" SourceCode: "' Add .tif to the ISrc extension list\nextn_list = ISrc.ReturnExtensions\nextn_list = extn_list.Add(\"tif\".AsString)\nISrc.SetExtensions(extn_list)" ) (Script.4 Name: "TIFF.CanUnload" SourceCode: "' Run script TIFF.ObjectsPresent to see if there is any ImgSrc in any View with a .tif extension.\n' Return result to boolean variable.\nobjectsPresent = av.Run(\"TIFF.ObjectsPresent\", NIL)\n\n' If objectsPresent is TRUE the dll should not be unloaded\nreturn objectsPresent.Not\n" ) (Script.5 Name: "TIFF.Unload" SourceCode: "' Remove .tif to the ISrc extension list\nextn_list = ISrc.ReturnExtensions\ntifIndex = extn_list.FindByValue(\"tif\")\nif (tifIndex = -1) then\n return NIL\nend\nextn_list.Remove(tifIndex)\nISrc.SetExtensions(extn_list)" )