ExternalReferencesTool

Tool

You can refer to this tool in any formula, macro, module, or other script in Blockpad. You can use either its name or its full path:

  • To refer to it by name, use ExternalReferencesTool (make sure the library Library.Tools.File is included with Include Libaries)
  • To refer to it by its full path, use Library.Tools.File.ExternalReferencesTool

 

See also:


With External References, you can reference values stored in other files, including Excel files and other Blockpad files.

Files can be added as an external reference in Blockpad, and then values inside of them can be referenced in formulas. The values are referenced using dot notation starting with the name of the external reference (xref1, xref2, etc). You can also automatically add the full reference name using the copy reference tool.

Reference a value from an external Blockpad file:
  1. Go to the value you wish to reference.
  2. Select the value and Right Click>Copy Reference.
  3. Go to the formula you wish to reference the value from (or open a new one).
  4. Paste the reference in.

In the example below, "Cost_Fence" in right file references "Wood_6ft" from the left file.

Xref_1

When an external value is referenced using the copy reference tool, an external reference is added to the Blockpad file and given a name. You can view all of the external references in a file in the External References window. From there, you can also add, remove, change the path to, and reload external references.

View external references in a file:
  • Select File>External References in the toolbar.

Xref_2

Another option to reference a value from an external Blockpad file:
  1. Select File>External References in the toolbar.
  2. Click Add.
  3. Navigate to the file you wish to reference and select it.
  4. Click Open.
  5. Close the External Reference window.
  6. Open a formula and type in the xref formula name (xref1, xref2, etc), followed by a period and then the value location and name, starting with the top level frame.
    • For example: xref6.Sheet1.C4 or xref3.Report1.Canvas3.Width .
    • See value containers for more information on value names and location.
    • You can always use copy reference to avoid this step.
Reference a value from a Microsoft Excel file using the Blockpad Add-in:
  1. In Excel, select the cell you wish to reference.
  2. Select Copy Reference in the Blockpad ribbon.
  3. Go to the formula you wish to reference the value from (or open a new one).
  4. Paste the reference in.

Note: If you are using copy reference on an Excel file, the file must be saved first.

Another option:

  1. Select File>External References in the toolbar.
  2. Click Add.
  3. Navigate to the file you wish to reference and select it.
  4. Click Open.
  5. Close the External Reference window.
  6. Open a formula and type in xref#.sheetName.cellReference.
    • xref# - the formula name of the external reference (xref1, xref2, etc)
    • sheetName - the sheet the cell is located in
    • cellReference - the location of the cell you wish to reference (e.g. C5, AE4, F88, etc).
Updating External References

If a value is changed in the source file of an external reference, Blockpad doesn't know to update formulas referencing that value. It's important to ensure external reference values are up to date if the source files might change.

Update an external value from a Blockpad file:

If both files are open:

  1. Make the change to the source.
  2. Go to the file referencing the value.
  3. Press F5 to update all formulas.

If the source file is not open and has already been changed:

  1. In the file referencing the value, select File>External References in the toolbar.
  2. Select the external reference that changed.
  3. Click Reload.
  4. Close the External Reference window.
  5. Press F5 to update all formulas.
Update an external value from any other kind of file:
  1. In the Blockpad file referencing the value, select File>External References in the toolbar.
  2. Select the external reference that changed.
  3. Click Reload.
  4. Close the External Reference window.
  5. Press F5 to update all formulas.
Remove an external reference:
  1. Select File>External References in the toolbar.
  2. Select the external reference you wish to remove.
  3. Click Remove.
  4. Close the External Reference window.
See also: