ViewDef ToolsThis 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. FeaturesThis extension provides the following features:
Copying a ViewDefA 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 IDAnother 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 solutionIf 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. Renaming a ViewDefA ViewDef can be renamed by right-clicking it in the file explorer and selecting Rename ViewDef. You will be prompted for the new name for the ViewDef. After renaming, you have the option to update all the calls to the old ViewDefId to the new one. The references to the ViewDef are only replaced in the Application solution. Comparison of a ViewDef copy to its sourceFor 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 duplicationAllows 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. SettingsThis extension exposes the following settings in the section Extensions > ViewDef Tools:
Notes on usage
|