If a macro has used the path to the Encyclopedia folder to locate and access a file, such as D0000001.wmf or Usrprops.txt, you must change it for use with V9 encyclopedias, which are maintained within SQL Server databases and store such files in a Files table.
The required file musto be exported before it can be used. The ISAImf object has an SAFileExport function that allows this.
For example, if the code in the macro is as follows:
... Let strEncyclopediaPath = appSA.Encyclopedia.FullName Let strUSRProps = strEncyclopediaPath & "UsrProps.txt"
In System Architect V9, the .Fullname property returns the UDL filename and its path. It might be preferable to use the .Path property that returns only the path to the UDL file. The path used to store the exported file could be any folder with write access.
The SAFileExport function takes the internal file reference and the external path and filename as parameters, returning 0 if the export is successful.
Let strPath = appSA.Encyclopedia.Path Let strUSRProps = strPath & "USRProps.txt" Let lngIMFerror = imfSA.SAFileExport("USRProps.txt", strUSRProps)
ISAImf.SAGetEncyclopediaPath
For the same reasons as those given for not using .Fullname (above), the GetEncyclopediaPath call cannot be used to locate and access encyclopedia files. Use the SAFileExport function, as described above.
Importing files
In some cases it might be necessary to import files into the encyclopedia, so that an internal reference can be made. An example of this is when the .SetField() subroutine is used to link a picture symbol with its image file, as follows