Global Project Linking—Importing Files From Other Projects

You can import files from another Flare project using Global Project Linking.

How to Import Files Using the Import Flare Project Wizard

The Import Flare Project Wizard guides you through the steps for importing Flare files from another project. When you use this wizard, an import file is created automatically and placed in the Imports folder in the Project Organizer.

  1. Select Project > Import > Flare Project. The Import Flare Project Wizard opens.
  2. Next to the Project file field click .
  3. In the dialog find and double-click the Flare project file (.flprj extension) from which you will be importing files.
  4. (Optional) If you want future changes to the files in the source project to be reimported automatically, click the Auto-reimport before "Generate Output" check box. If you select this "Easy Sync" option, the changes to the source files will be reimported automatically when you generate output. If you do not select this option, you can reimport future changes from the other project manually.
  5. (Optional) If you want outdated files (e.g., files that have been deleted, renamed, or moved in the parent project) to be deleted from the child project automatically, click the Delete stale files check box.

    Example You import a group of files from a parent project into a child project. Later, you delete some of the files from the parent project. Selecting this option will remove the stale files from the child project automatically when you reimport files. The stale files will be deleted when you reimport either manually (by clicking Reimport in the Project Import Editor) or automatically when you generate output (if you have selected Auto-reimport before "Generate Output" in the Project Import Editor).

    Warning If you do not use this option, you must remember to delete the stale files in the child project manually. Otherwise, the files in the parent and child projects will not match.

  6. (Optional) You can select Delete unreferenced files. This means that any files that were previously imported—but are not specified to be included (either under the Include Files or Import Conditions filters) in the reimport—will be marked for deletion in the Accept Imported Documents dialog and removed from the child project upon confirmation.

    Example Previously you had the Project Import Editor set up like this, where you are importing three topic files from a parent project:

    Later, after you've made lots of changes to the parent project, you open the child project again to import the latest files into it. However, you decide you no longer want to import the Welcome.htm topic into the child project (although it still exists in the parent project). So in the Project Import Editor, you remove it from the Include Files field. You also click Delete unreferenced files.

    When you tell Flare to reimport, the Accept Imported Documents dialog opens, showing the following:

    After you click Accept in that dialog, the changed files are replaced and Welcome.htm is removed from the child project.

    If you had not selected the "Delete unreferenced files" check box, the two changed files would still have been imported, but the old Welcome.htm topic would still remain in the child project.

    This feature is slightly different from "Delete stale files." When you tell Flare to delete stale files, you automatically sync the parent project with the child project when you've removed files in the parent. So in the example above, the Welcome.htm file would automatically be removed from the child project if you had also removed it from the parent project.

  7. Click Next.
  8. Use the Include Files and Exclude Files fields to select the type of files to be included in the import or excluded from it. Click the down arrow next to the appropriate field and select the type of files. Completing the Include Files field is mandatory. Completing the Exclude Files field is optional.

    If you want to import all of the files from the global project, select All Files (*.*).

    Note You are not limited to importing all files of a single file type. The following steps explain how to add more than one file type to the field, as well as how to select specific files to be imported while excluding others.

  9. (Optional) If you want to add more file types to one of the fields, click the Edit button under the appropriate field and use the following steps.
    1. In the Import File Filter dialog click Add. The Import File Filter Designer dialog opens.
    2. Select the file type that you want to add. You can also use standard wildcards (text between asterisks) to enter patterns directly into the Pattern field (or into the Include Files or Exclude Files fields).

      Example You want to import only topic files that contain the word "Interface" in the file name. Rather than selecting to import all topic files and then later systematically deselecting the ones you do not really want in the import (via the Accept Imported Documents dialog), you can enter the following:

      *Interface*.htm;*Interface*.html

      Or maybe you want to import only files that have an extension starting with "fl," such as TOC files (.fltoc) and snippet files (.flsnp). In order to do this, you could enter *.fl* in the field, like the following:

      *.fl*

    3. Click OK.
    4. In the Import File Filter dialog, click OK.
  10. (Optional) Let's say that the files you are importing contain links to other files. If you want Flare to automatically import those files as well, click Auto-include linked files. Not only will the immediate linked files be included, but any linked files from those files as well, and so on. It is a "domino" effect until no more linked files are found.
  11. (Optional) In addition to specifying certain files or file types to include or exclude from the import, you can go a level deeper through the use of condition tags. If you have applied condition tags to files in your project, you can use the Import Conditions field to tell Flare to include or exclude certain files, depending on the condition tags that are applied to them at the file level. Simply click the Edit button to choose the conditions. In the Conditional Text dialog for this feature, you can use the Basic or Advanced mode for creating condition tag expressions. See Creating Conditions, Applying Conditions to Content, and Creating Basic and Advanced Tag Expressions.
  12. (Optional) If you use the "Import Conditions" option, you may want to make sure that files without condition tags in the source project are not included in the import. If that is the case, click Auto-Exclude Non-Tagged Files.
  13. Click Finish. The Accept Imported Documents dialog opens. The files in the source project are listed (depending on whether the file types were included or excluded from the import in the previous steps).
  14. (Optional) The Accept Imported Documents dialog provides you with one last look at the files to be imported, allowing you to make sure everything is correct and letting you change your mind on any of the files. If you recognize files in the dialog that should not be imported, you can click the check boxes next to the files you want to exclude (removing the check marks).

    You can use the Select All and Clear All buttons as necessary. For example, if you only want to include a very small number of the files listed, you can click the Clear All button and then manually click the check boxes next to the files you want to include (this is quicker than individually deselecting each file that you want to exclude).

    Note If the current project already contains a file with the same name, the Status cell may be highlighted in green or red. Green shading indicates that the source file is newer. Red shading indicates that the local (or current) file is newer. If the file is identical in both projects, the check box is deselected by default.

    Tip You might find it useful to click on the column headings in the Accept Imported Documents dialog. Doing this reorganizes the contents in alphabetical order of the column that you click. For example, by clicking the Status column, you can easily group together all of the files that have red or green backgrounds (i.e., files that are newer in the local project or newer in the source project). This can be especially useful when reimporting project files. See Reimporting Files From Other Projects.

  15. Click Accept. If the current project already contains files with the same names, you may be asked if you want to replace the local copies. Select Yes if you do.

Note When you manually import files from the parent project, you will see the Accept Imported Documents dialog. This dialog lets you manually check or uncheck the files to be imported or excluded from the import. It is sort of a last chance to take a look at the files and make changes (include or exclude) before the actual import takes place. It also remembers whether you have checked or unchecked certain files during previous imports. However, when you use the "auto-reimport before generate output" feature, the import takes place automatically, so you do not see the Accept Imported Documents dialog. This means that all files will be imported automatically based on the criteria you provide, regardless of whether you have previously deselected a file during a manual import. This is one reason it is recommended you use conditions during Global Project Linking; with conditions, you are more assured of importing the correct files during an automatic import.

For example, let's say you have four topics—TopicA, TopicB, TopicC, and TopicD—and you have not conditioned any of them before importing. In your project import file, you specify that all topic files should be imported. You then perform the import. The Accept Imported Documents dialog opens, listing all four of your topics with check marks next to each one. However, you decide that you really do not want to import TopicD, so you remove the check mark next to it. After completing the manual import, TopicA, TopicB, and TopicC are imported, but TopicD is not. Later, let's say you have made changes to your files and need to reimport. After you click Reimport, you again see the Accept Imported Documents dialog. Again, check marks are automatically shown next to TopicA, TopicB, and TopicC. However, Flare remembered that you removed the check mark next to TopicD previously, so the check mark remains absent from it. You finish the reimport and everything goes according to plan.

Now let's say that after a few manual reimports, you decide to use the "auto-reimport" feature. Therefore, in your import file, you click the check box next to Auto-reimport before "Generate Output" and save. When you build the output, which topics are imported? The answer is TopicA, TopicB, TopicC, and TopicD.

In this example, one of the best ways to use the auto-reimport feature and be assured that the correct topics are included and excluded is to use condition tags at the file level. Therefore, in your source project, you create one condition tag (let's say you name it "YesImport") and you apply it to TopicA, TopicB, and TopicC. Then you create a second condition tag (let's say you name it "NoImport") and apply it to TopicD. Then in the child project, you open your import file. You click the Edit button next to Import Conditions, and within the dialog that opens you tell Flare to include the "YesImport" condition and exclude the "NoImport" condition. Now, the next time you build the output, which topics are imported? The answer is TopicA, TopicB, and TopicC.

Note A link icon displays on tabs in the XML Editor next to file names that are imported from and linked to another file or Flare project. However, if you are also using the built-in source control technology, the source control icons have a higher precedence and will therefore be displayed instead.

Note The Imported Files tab in the Import Editor displays the files that have been imported previously.

Note In the Project Import Editor, the Removed Links tab displays any files that were previously imported, but the link to the source project has since been removed. For example, let's say that you have imported several files from a source project. After awhile, you open one of those files in the project where the files were imported. You make a few changes and attempt to save it. Because Flare sees that a connection exists between the file and the source project, it prompts you with some options. One of the options is to continue to save your changes and remove the link from the source project. This means that future changes to the file need to be made in the current project, rather than in the source project. When you remove a link to a file in this way, that file is added to the Removed Links tab.