Adjust Links Dialog Box

The Adjust Links dialog box allows you to change the path of a set of links. This is useful if you move the sources for a document without moving the document. (If you need to change only one objects’ pathname, or only a few unrelated pathnames, see Edit Link.)

Pathnames are stored by SoDA in a document-relative format. If the sources move and the document does not, the internal pathnames within links in the document must be adjusted. If they are not, the sections generated from the sources in their original locations may be deleted from the document when SoDA cannot find the moved sources during regeneration.

For example, a REPEAT command is defined to create a section for every file in C:\PROJECTS\JIM. After the document is generated and text has been added, the project is transferred from Jim to Susan. Now, the files are located in C:\PROJECTS\SUSAN. Adjust Links allows you to make this change to your SoDA document simply.

Without Adjust Links, you would have to either

§  change each link manually, or

§  edit all OPEN commands to point to the correct directory, and regenerate, losing all added text in the process

Adjust Links first converts relative pathnames to absolute pathnames. SoDA then checks the absolute pathname to determine if the link should be updated. For this reason, full pathnames must be specified in the Adjust Links dialog box.

When you adjust links, you will not notice an immediate change in your document. When you regenerate your document, however, the change may become apparent. As the document regenerates, the new path in each link is followed instead of the old one. Every SoDA link from the changed link in the hierarchy down will be updated to reflect the new source path in each link. Of course, if you have adjusted the links properly, and the sources haven’t changed other then their location, your document should stay the same.

To modify links:

1. Choose Adjust Links from the SoDA menu.

2. From the Adjust Links dialog box, enter the invalid path and the path to which you want to change it:

§  Enter the full path to modify in the From field.

§  Enter the new full path in the To field.

3. Click the OK button.

SoDA compares the pathname you entered in the From field to each OPEN command (only the absolute paths) and link. It then changes all the paths matching the pathname in the From field to the path you entered in the To field. When you regenerate your document, the new paths will be used and information in the generated document will be updated to reflect the change.

Get From File

The Adjust Links dialog box contains a Get From File check box. When the option is off, SoDA treats the pathnames in the From and To fields as pathnames found in links, OPEN commands, etc. When the toggle is on, SoDA uses the pathname in the From field to find a text file. This "From" text file contains a list of pathnames to be changed. SoDA uses the pathname in the To field to find another text file. This "To" text file contains a list of pathnames to which you want to change.

For example, Jim has the following files:

 c:\people\jim\projects

  documentation

  code

  misc

A REPEAT command has created links to all the files in Jim’s documentation, code, and misc directories.

Because Jim has left the company, all of his project files must be transferred. His documentation files will go to Susan. His code files will go to Cynthia. His miscellaneous files will go to Dave. Now, the files have the following paths:

 c:\people\susan\projects\documentation

 c:\people\cynthia\projects\code

 c:\people\dave\projects\misc

To update the links in the SoDA document, a "From" text file called

c:\people\susan\from_list contains the following lines:

 c:\people\jim\projects\documentation

 c:\people\jim\projects\code

 c:\people\jim\projects\misc

A "To" text file called \people\susan\to_list contains the following lines:

 c:\people\susan\projects\documentation

 c:\people\cynthia\projects\code

 c:\people\dave\projects\misc

When the Adjust Links command is issued, Susan enters

" c:\people\susan\from_list" in the From field, and she enters

" c:\people\susan\to_list" in the To field. She then toggles the Get From File option on.

When Susan clicks OK, SoDA compares the SoDA document with the "From" file. SoDA then changes paths containing the first line of the "From" file to pathnames containing the first line of the "To" file.

Each path in the "From" file is replaced by the path on the corresponding line of the "To" file, thus order within the files is very important. If the third line of the "To" file in the example above was

" c:\people\cynthia\projects\code" then all references to Jim’s miscellaneous files would be changed to references to Cynthia’s code.