Circuit Upgrade Tool
The Circuit Upgrade tool was originally used for customers upgrading from Fiber Manager versions 10.2.1a and prior.
Now, you can use the tool to bulk recalculate circuits to clean up bad data due to previous configuration errors or end user misuse of the ArcMap or ArcFM toolsets.
Context
To step back, Circuit Manager has the ability to recalculate circuits. For example, if you attempt to trace an existing circuit that is missing its entry in the F_CIRCUIT table, you receive the following message:
At that point, you can highlight the circuit in Circuit Manager and click ReCalc. This re-builds the circuit and re-populates the entry in the F_CIRCUIT table.
This method is a circuit-by-circuit process. The Circuit Upgrade tool described in this topic achieves the same results, but it can re-calculate multiple circuits within the same process.
Using the Circuit Upgrade Tool
There are three main tasks to perform when using this tool:
-
Nullify the Graph Attributes of the Corrupted Circuits in the F_CIRCUIT table.
-
Delete the circuit child records in the F_CIRCUITCOMPONENTS table.
-
Run the Circuit Upgrade tool.
As a prerequisite, the tool must be added to a toolbar via the Customize dialog. This tool does not have an icon.
-
Test this tool first in a discardable version or session.
-
Back up your database prior to running this tool.
-
Run this tool to fix circuits in batches instead of running it against all circuits at the same time. This allows you to validate and verify the results on a smaller scale.
-
The clean up process includes direct editing of system tables. This is typically highly discouraged, but it is a necessary process for the Circuit Upgrade tool. So, one more reminder to back up your database prior to running this tool.
Nullify the Graph Attribute of the Corrupted Circuits
As discussed in the help topic F_CIRCUIT, there is a field in the F_CIRCUIT table that contains a character-based tracking method to understand the connections within a circuit. It is automatically populated and maintained by the application. This field is commonly called “Graph” or “Fiber Circuit Graph,” but most importantly, it is the field assigned the field model name FIBERCIRCUITGRAPH.
The first task when using the Circuit Upgrade tool is to nullify this field attribute for the corrupted circuits. Later, the tool re-populates this field.
There are a variety of ways to find the corrupted circuits in the F_CIRCUIT table, but one of the easiest is to use the circuit names. This is the method used in the steps below, but it assumes you have a list of known, corrupted circuits
To nullify the Graph attribute, follow these steps:
-
Make a list of the names of the corrupted circuits in any helpful application such as Word, Excel, Notepad, etc.
-
Create a version or a session, then start editing.
-
In the Table of Contents > List by Source pane, right-click the F_CIRCUIT table and choose Open.
-
Select the corrupted circuits. As stated above, there are many ways to do this, and the ultimate goal is to create a selected set of corrupted circuits. These steps use circuit names to achieve this. To use the circuit names, follow these sub-steps:
-
In the F_CIRCUIT table, click Table Options > Select by Attributes.
-
Double-click the field that contains circuit names (in the image below it is called CircuitName). This drops the field into the query builder.
-
In the query builder, type a space after the circuit name, type the word IN, then type an open parenthesis.
-
Click the Get Unique Values button. This populates the dialog with all unique circuit names.
TIP: This populates the dialog with all circuit names, and if you have thousands, it might actually make it more difficult to find the specific, corrupted circuits. If you are dealing with a small number of circuits, it might be easier to just paste in the circuit names from your list in Step 1. Use your best judgement on which approach is easier. -
One by one, double-click the circuit names to drop them into the query builder. After each name, type a comma. In sum, you are filling the parentheses with all the corrupted circuit names, and they are separated by commas.
TIP: The circuit names are sorted alphanumerically. Use the Go To field to jump to the next name. Also, if you are handy with Excel, you could concatenate circuit names and commas to build the expression, then paste it into the Select by Attributes dialog. -
After your final circuit, type a closed parenthesis. In the image below, there are 7 corrupted circuits within the parentheses.
-
Click Apply. Notice, the circuits are selected in the F_CIRCUIT table.
-
Close the Select by Attributes dialog.
-
To help isolate the view of the selected circuits, click the Show Selected Records button.
-
-
Scroll over in the F_CIRCUIT table to find the Graph field. Again, this could be called “Graph” or “Fiber Circuit Graph,” but as seen in the image above, it is the field that contains the character-based tracking method of the circuit path. It is the field assigned the field model name FIBERCIRCUITGRAPH.
-
Right-click the Graph field and choose Field Calculator.
-
Type the word “null” in the calculator.
-
Click OK.
-
After the calculation is complete, verify that the selected circuits now have a <Null> Graph attribute.
Delete the Related F_CIRCUITCOMPONENT Records
Now that you have nullified the Graph attribute for the corrupted circuits, it is time to delete the circuits’ child records in the F_CIRCUITCOMPONENT table.
In short, you find the Global IDs of the corrupted circuits, and then use those IDs to locate the child records. Once the child records are located, you delete them.
To delete the circuits’ child records in the F_CIRCUITCOMPONENT table, follow these steps:
-
In the Table of Contents > List by Source pane, right-click the F_CIRCUITCOMPONENT table and choose Open. Notice it opens as a new tab in the Table dialog.
-
Toggle back to the F_CIRCUIT table, and locate the Global ID field.
-
Ensure the corrupted records are still selected in the F_CIRCUIT table. If not, return to the task above to re-select the corrupted circuits.
-
Right-click the first Global ID and choose Copy.
-
Toggle back to the F_CIRCUITCOMPONENT table.
-
Click Table Options > Select by Attributes.
-
Double-click the field that contains the Circuit Global IDs (in the image below, it is called CircuitGuid, but your database might differ). This drops the field into the query builder.
-
In the query builder, type a space after the CircuitGuid field, then type the word IN, and finally type an open parenthesis.
-
Paste the first Global ID into the query builder. Then, type a comma.
-
Toggle back to the F_CIRCUIT table.
-
Right-click the next Global ID and choose Copy.
-
Paste it into the query builder. Then, type a comma.
-
Continue to copy and paste Global IDs into the query builder. Always type a comma after the Global ID.
TIP: This works well if you have a manageable number of circuits. But, if you had dozens, this method might be too time consuming. In that case, you could export the selected records in the F_CIRCUIT table to a .dbf file. Open that file in Excel. Then, create a comma-delimited “Concatenate” statement to bring all the Global IDs together. Finally, paste that into the query builder. -
After your last Global ID, type a closed parenthesis.
-
Click Verify to validate the syntax, then close the Success message (or fix any errors).
-
If necessary, toggle back to the F_CIRCUITCOMPONENT table.
-
Click Apply. Notice the child records are selected (your selected number differs from the following image).
-
Save your session.
Run the Circuit Upgrade Tool
To use the Circuit Upgrade tool, follow these steps:
-
Ensure you are still in your edit session.
-
Click the Circuit Upgrade tool (again, this tool does not have an icon).
-
In the Circuit Upgrade tool dialog, click Scan. The tool goes through the F_CIRCUIT table looking for circuits with missing or corrupted entries in the Graph field.
-
Once the scan is complete, the tool displays:
-
The Object ID range of circuits that require an upgrade.
-
The number of circuits that require an upgrade.
For example, in the following image, notice the “OID Range” is 44–62. This means the lowest Object ID is 44 and the highest is 62. This does not mean that all circuits between 44–62 require an upgrade. That is why the “Circuits Remaining” field is important, because it shows the count of circuits within that range that require an upgrade. As you can see in the following image, there are many circuits interspersed through this range that already have their Graph attribute.
-
-
In the Circuit OID Range field, type the range of Object IDs for the circuits you want to upgrade. Using the image above as an example:
-
Typing “44–44” would upgrade a single circuit: 44.
-
Typing “44–45” would upgrade 2 circuits: 44 and 45.
-
Typing “44–54” would upgrade 6 circuits: 44, 45, 47, 48, 49, and 54.
-
Typing “44–62” would upgrade all 7 circuits: 44, 45, 47, 48, 49, 54, and 62.
-
-
Click Upgrade. Notice the progress bar updates as it upgrades circuits.
-
When the tool is complete, you can click View Log. This log only populates, though, if there were errors. In that case, read through the errors to help troubleshoot.
-
If the upgrade passes your own quality checks and verifications, you can post your edits or submit your session through your company workflow.