One of the most frequently asked questions is "What is Pathagoras actually doing when I press certain keys or click certain buttons?"

   To best understand Pathagoras, and to convince you of its simple, plain text, underpinnings, it is helpful to know what is happening 'behind the scenes' when you select a certain activity.

   In almost every case, Pathagoras operates simply by speeding up common Word activities, activities such as “find and replace”, “copy and paste”, “file open” and “file save”. When you click a specific function, in most cases you will experience a souped up version of one of these.

   Knowing what Pathagoras is doing will also help when you encounter a problem. Use your existing knowledge of Word functions and you should be able to work your way through or around any problem. You won’t mess up anything in Pathagoras. (Of course, if you encounter a problem, we want you to tell us right away so that we can fix it.)

(Note: the below answers to “what’s happening” contain more information than you need to know to perform any Pathagoras operation. These section is entirely optional.
However, to the extent your curiosity about the inner workings of the program
has piqued your curiosity, we offer the following.)

What’s happening:

. . . when I click the Document Assembly icon from the toolbar?

   Pathagoras looks in a simple text file located in the 'c:\program files\pathagoras\pathsmart\subjects' folder titled "clausepaths.txt" That file represents the ‘default’ library.

  The ‘default’ library is the last one that was opened. (If you have a new installation, the default library is the "DocAssemDemo" library.

   It reads the text in that file and fills in the various ‘shelves’ on the initial Document Assembly screen based on that text. It then displays the initial Document Assembly (Libraries & Books) screen with the default Library name and the various books in the library on display. Pathagoras also reads the names of remaining files in that folder (each file representing a 'library') and displays them into the Available Libraries drop down list at the top of the Libraries & Books screen.

. . . when I select a new library from the Available Libraries drop down list?

   Pathagoras looks in a simple text file located in the 'c:\program files\pathagoras\pathsmart\subjects' folder that corresponds to the name of the library that you selected. It reads all of the data in that file and fills in the various ‘shelves’ on the initial Document Assembly screen with the new values. It also sets this library to the default library by copying it over to the file "clausepaths.txt".

. . . when I  select a book?

   Pathagoras looks in the library’s "clausepaths.txt" file (described above) and locates the line in the file that corresponds to the “shelf” that you selected. It reads and stores the following information into active memory:

(1) the  full path to the folder in which the files are located;

(2) the template that may have been associated with the book (if no template, then the ‘normal’ template is assigned);

and

(3) and the Instant Database mask that may have been associated with the book.

   All of these settings values can be viewed (and edited) from the Document Assembly 'Settings Screen.' To access the Settings Screen, click the Document Assembly icon. Drop down the Libraries list. Scroll to the very bottom and click “<<Settings>>.” You will see everything that Pathagoras ‘sees.’

. . . when I click the “Next” button on the Libraries and Books screen?

   Pathagoras recalls from active memory the full path to the folder in which the files are located. It quickly reads the names of each document (“.doc” and, if Word2007 “.docx”, files) that exists in the folder. It also quickly determines the subject of each document. The 'subject' found in the document properties collection that Word creates for every document. All information is stored in active memory.

   Pathagoras then determines which of these two lists it will show in the Clause Selection Screen – either ‘Names’ or ’Subjects', depending upon which display you have chosen (or the ‘default’ display, if you have not chosen one).

   Pathagoras sorts the list alphabetically and presents it to you in a two panel display called the Clause Selection Screen. The left panel of the Clause Selection Screen is populated with the names (or subjects) of all available clauses. (You can ‘reverse’ the display -- names vs. subjects -- by clicking the ‘opposite’ value from the radio buttons at the right.)

. . . when I select a clause and move it from the left panel to the right?

   Not much is really happening here. The value is simply copied into the left panel, generally to the bottom of the list. (If you move the ‘selection’ to a place higher in the list (just click an entry), it will insert the left-selected item beneath the right-selected item.) Using the up and down arrows to the right of the right panel, you can change the list order.

. . . when I click the Next button on the Clause Selection Screen?

   Pathagoras first stores in active memory the contents of the right panel. It has already ‘memorized’ the other information it needs to proceeds. (See “When you select a book . . .”) What it does next depends upon the setting of the “Assemble” vs. “Insert” radio buttons.

   If “Assemble":

If a template has been associated with the book, Pathagoras locates that template and lays it down as a new document. It then locates, in top-to-bottom order, the clauses that were in the right panel. (Pathagoras is simply appending the selected document’s name to  full path to the folder you selected.) It locates and opens the first selected item, copies it content to the clipboard, returns to the document being assembled and pastes the clipboard contents to the bottom of the document being assembled. It repeats the same for all subsequent items in the right panel of the Clause Selection Screen. It all happens very quickly, so you cannot see what it happening (and to the extend that screen changes can be minimize to reduce ‘flashing’, we have done so).

   If "Insert":

Pathagoras determines the cursor location and saves it as the 'insertion point' where the new clauses will be inserted. Pathagoras then locates and opens the first selected item, copies its content to the clipboard, returns to the document being assembled and pastes the clipboard contents to the bottom of the document being assembled. It repeats the same for all subsequent items in the right panel of the Clause Selection Screen. It all happens very quickly, so you cannot see what it happening (and to the extend that screen changes can be minimize to reduce ‘flashing’, we have done so).

 After the document is ‘complete,’ Pathagoras checks to see if there are any <<BLOCKS>> in the newly assembled document. <<Blocks>> can be any of the following: <<*Options*>> ,<<*Options(radio*>>, <<*Optional*>>,{Simple options}, {Simple Optional}, <<*Repeat*>> or <<(clause)>> blocks , and clause sets.  These are automatically processed (unless you have elected to suppress the processing of these items).

. . . when I click a document from a DropDown List:

   Pathagoras records the value of your selection into active memory. It then checks the values in the very top line and the very bottom lines of the DropDown List to determines the full path to the folder that contains the files shown in the list. It appends the name of the selected item to the path and checks to see if the selected file exists in the folder.  It locates and copies the content of the document into the ‘clipboard’.

   Pathagoras next determines the value of the “Insert/New Doc” toggle.  If “Insert”, Pathagoras pastes the content of the clipboard into the active document at the insertion point (where the cursor was last positioned). If no document was on screen, it opens one for you.  If the setting is “New Doc”, Pathagoras opens a new document based on the settings of the selected document (that way, all styles, headers, footers, etc. found in the original are preserved) and pastes the content of the clipboard into this new document. (If the selected file no longer exists in the folder, it reports that back to you and suggests that you Refresh the DropDown List. )

. . . when I press the Next button on the Instant Database screen:

   Using standard Word ‘find & replace’ techniques (sped up 100 fold), Pathagoras searches for, from top to bottom, each entry in the left column and replaces it with the values provided in the right column, for up to 999 separate variables.

. . . when I press <Alt-D> (Instant Database):

   Pathagoras opens up the folder that has been designated as the ‘File Location’ for the Instant Database files. (This is set under the Instant Database Settings.) It then reads all of the files that have “.csv” as an extension and stores them into active memory. It then subdivides these into to groups – masks and matter records. (If the file name starts with a “_”, it is a mask. Otherwise it is a Matter Record.)

   Pathagoras sorts the masks and matter records alphabetically and places the mask names into a dropdown list in the upper left side of the IDB screen and the matter names into a dropdown list in the upper right side of the IDB screen.

   (When you  initially install Pathagoras, the default location for your IDB files is pointing to “C:\Program files\PathagorasIDBs”.  However, this location use totally user controlled. Your IDB files can be wherever you wish them to be. To remain stand-alone, just leave them in the default location. To share them with others, move the files to a network location and have everyone on the network – or as many on the network as you wish to be using the same set of data --point to the same physical location on the network.)

. . . when I press the Scan button on the Instant Database screen:

   Using standard Word ‘find’ techniques (sped up 100 fold), Pathagoras searches for an opening bracket. When it finds one, it selects it and all subsequent text up until it finds a closing bracket. Once a variable has been ‘discovered’ (by the presence of an opening and closing bracket, Pathagoras adds it to the list of variables that are displayed in the left hand column. (Actually, Pathagoras first checks to see if the variable has been earlier discovered. If so, it discards it – variables are shown only once in the list.)

   If you have set a ‘maximum size’  for your variables (mainly to act as a check to make sure that you have closing markers for all variables) and the character count for the variable exceeds that count, Pathagoras will stop the process and allow you to check on the 'correctness' of the variable.)  

   The order of the display of variables is ‘top to bottom’ (first found first shown). You can rearrange the order of the variables using the up and down arrows found under the Power Tools and then save the IDB screen reflecting the new (presumably more logical) order as a “Mask” (and that should explain one of the benefits of a mask.)

. . . when I select a Matter Record?

   Pathagoras opens up the folder that contains your Instant Database files. It then finds the file that bears the name you selected. (It does this by appending ‘.csv’ to the end of the selected name, and does a simple file open).

   This matter file comprises 2 lines. The top line contains all of the variable names (the ones in brackets).  The second line contains all of the replacement values

   Pathagoras ‘splits’ each line into its separate components, the split point being wherever the splitter finds a comma (hence the file designation “csv” –comma separated values).  (The saving routine makes sure that there are as many commas in the first line as there are in the second, and that the proper order is maintained. ) The variables (first line) are then presented down the left side of the IDB screen, and the values (second line) are shown at the right.

. . . when I select a Mask?

When you select a Mask, Pathagoras follows the same steps as when you select a Matter Record.  Of course, instead of ‘personal values’ being shown in the right column, either ‘blanks’ or (better) earlier saved ‘completion tips’ are displayed.

. . . when I press <Alt-G> next to a number?

If the number is between 1 and 12, Pathagoras is going to assume that you are wanting to open the SmartPath assigned to the number typed, and will immediately display the documents in that folder in a normal 'File Open' dialogue.

If it's not a number between 1 & 12, see below.

. . . when I press <Alt-G> next to text (other than the numbers 1 to 12)?

Pathagoras is going to carefully study the text to see what is being called. It parses the text to see if it follows the prefix/suffix pattern of a clause, and if so it looks for the clause in the folder associated with the prefix. If not in the prefix/suffix style, Pathagoras next looks to see if it is a fully qualified reference to a document. If so, it calls up that document. If not, then it looks to see if the text is a document in one of 3 places: the first position book of the current library, the Super Book and the Super Glossary. If it cannot find it in any of those places, it reports "Cannot Find." The process is explained in greater detail in the Order of Search pages of this manual.