Skip to main content

Formula Syntax Repair Utility

This article explores Microvellum's Formula Syntax Repair Utility, explaining the functions, process, and purpose of the utility for users.

J
Written by Jordan Munoz

Microvellum library data relies on spreadsheet workbooks to define formulas used throughout product engineering logic. These formulas are parsed by the spreadsheet, but certain improperly formatted formulas could sometimes exist within library data without notice. These formulas can trigger corrupt workbook errors when parsed and may cause the software to crash.

The Formula Syntax Repair Utility is a Microvellum tool designed to assist users by evaluating the formula integrity of their workbooks and the items contained within them. It scans workbooks for formula syntax problems and repairs them, with you reviewing each fix. Its main job is to keep your product library working properly with the current spreadsheet engine.

What the Utility Scans for

The utility (at the time of writing) scans the selected workbooks for four known kinds of formula syntax problems:

  1. Extra operator before a comma: A '+' or '-' has nothing after it before the next comma. The fix removes the extra operator.

  2. Missing value before a comma. A comparison (=, <, >) has no value before the next comma. The fix adds 0.

  3. Missing value before a closing parenthesis. A comparison has no value before a closing parenthesis. The fix adds 0.

  4. Broken text join. The quote and & sequence that joins text together is malformed. The fix corrects it.

These four syntax problems are among the most commonplace ones usually found causing issues with formulas.
​

When running a scan, you have the option to choose which categories to scan:

  • Library: Products, Subassemblies, Globals, Project Wizards and Door Wizards.

  • Project: The same five categories, but on the project level. If scanning on the project level, you will be prompted to select the specific project(s) you intend to scan.

How to Run the Utility

Running the utility requires the Formula Syntax Repair Tool permission, which Administrators always have. If a user is not an administrator, they will need to have a user with admin privileges assign this permission to them before the utility can be run.

  • Automatically: A one-time prompt appears the first time Microvellum is booted up after installing or updating to a build that contains this feature (build 26.1.1012 or newer), prompting whether you wish to scan your workbooks. This prompt dialog can be set to "Do Not Show Again" to dismiss it. Otherwise, it will keep appearing at startup until the first scan has been completed, to set a baseline for all current workbooks.

  • Manually: Even if the initial scan is not completed, the utility can be accessed at any time from Microvellum Settings > Options > Utilities.

The Scanning Process

  1. Permission prompt. Choose Scan Now or Remind Me Later. If this is not the first time opening a build with the utility included, you can instead access it by opening Microvellum Settings > Options > Utilities > Formula Syntax Repair Utility.

  2. Choose what to scan. Select the categories to scan. If you chose any project categories, you then select which projects to include.

  3. Review each issue. For each problem found, a window shows the workbook, sheet and cell, provides a simple explanation of the issue, and the original and proposed formulas side by side with the change highlighted. You can:

    • Apply the suggested fix or edit it first. An edited formula is checked before it is saved, and an invalid one is rejected so you can correct it. Reset restores the suggested fix.

    • Skip this issue, Skip All and Log the remaining issues, or Stop Scan.

    • Tick a box to apply the same fix automatically to all exact matches, all issues of the same type, or all remaining issues.

  4. Summary. When the scan ends, you see how many workbooks were scanned and how many issues were found and fixed. From here you can scan other configurations in the same session. Microvellum switches back to your original configuration when you finish.

  5. Logs.

    • Repair log: Each scan saves a log of every issue and whether it was applied. Logs are stored in the "FormulaSyntaxRepair\Logs" folder inside your Microvellum Data folder, named by date, time and configuration. You can view them from Options > Utilities > View Syntax Repair Logs.

    • Event Log: A one-line summary of each scan is also recorded in the Microvellum Event Log as User Activity.

Precautions and Warnings

  • Back up your database first. Fixes are saved directly to the database and cannot be undone. The repair log records each original formula, so a fix can be reversed by hand if needed.

  • Use the "apply to all" options carefully. All remaining issues and all issues of the same type apply the suggested fix without showing you each one. Only use them if you are confident in that fix.

  • Restart Microvellum afterwards. Workbooks in a project that is already open may keep showing the old formulas until you restart.

  • A clean scan only covers the four issue types above. It does not confirm that every formula is absolutely correct, currently. It is expected that in the future, the number of syntax error types that will be covered by its scans will increase.

  • Skipped configurations have not been scanned. If a configuration's database cannot be reached or needs to be updated, it is skipped and listed in a message. Check the error log for details.

  • Stopping early leaves the scan incomplete. If you stop a scan, the startup prompt continues to appear until a full scan is completed.

  • Only one scan can run at a time.

Did this answer your question?