This VSCode extension enables functionality to manipulate ViewDef files for Mercury projects. It is focused on the tasks that project execution engineers with those files, which mostly consist on copying the ViewDefs from the WcsStandard or the technology solution into WcsApplication.
This extension provides the following features:
Copying a ViewDef
A ViewDef can be copied by right-clicking it in the file explorer and selecting Copy to Application solution. You will be prompted for the name of the new ViewDef. You can give it a new name, or leave the original name, to "replace" the original ViewDef completely:
Doing this, you still have to be sure that you are copying the right ViewDef, that is, you should locate the ViewDef that you want to copy in its appropriate solution: WcsStandard, WcsMilling, etc.
Copying a ViewDef directly by its ID
Another option is to execute the command
When copying by the ViewDef ID, the extension finds automatically from which solution the file should be copied, taking the compilation order into account. That means that ViewDefs in WcsApplication have priority over technology (e.g. WcsMilling), which are followed by WcsStandard.
Copying to any solution
If the option Extended Commands Enabled is active (see Settings), it is also possible to select to which solution the ViewDef will be copied to. The list of solutions is evaluated from the build configuration file.
Comparison of a ViewDef copy to its source
For ViewDefs created with the duplicate function, it is possible to compare it with the ViewDef it was copied originally from, in order to see what it changes from the built-in Mercury view:
If a ViewDef has not been copied with this extension, but still has the same name as the original one - for example, SingleJobViewDef inside WcsApplication, the extension also manages to find the original ViewDef.
Workplace Task duplication
Allows the user to copy the files related to a workplace task, assigning the name of a new worplace task to all files at once.
This command is only available for ViewDef fils inside the Wcs*Application folders, which contain the workplace task name suffix in the file name, for example, _MainOperating, _Intake, _MyWorkplace etc.
This extension exposes the following settings in the section Extensions > ViewDef Tools:
Notes on usage