I seem to remember that there was a way to stop the Release operation from being done by setting something via Custom.vb.
What I am trying to do is ensure that a function in Custom.vb returns an acceptable value before allowing Release to occur. I'd like to be able to do is so it can't even move to the next process step also.
Solved! Go to Solution.
Did you look at the 'BeforeRelease' event on RsEngineer. May be that has an argument to veto the action.
The ValidModel functionality should be able to help here. You'd set the rootpart's ValidModel property value to the custom.vb function. Here are the details of how that works:
Preventing a Model from Releasing using ValidModel
When a model is released, RS Engineer examines the ValidModel property on the RootPart. If it is true or does not exist, the release proceeds. If it is false, the system displays a popup box with the message that is contained in the ValidationMessage property on the RootPart. The user is asked if they want to abort the release or continue. The image below shows the box that is popped up when the model is false.
Add a RootPart property, InvalidModelAction, which like those above is under the control of the architect and would be examine it in the release process before the box above is displayed. InvalidModelAction is a string with one of the following values: “Continue”, “Abort”, or “Ask” (default).
If the value is Continue: Display the message box with the top line reading “Warning: The model is invalid. Continuing with the release.”, and then display the ValidationMessage, if defined, on the next line, and then show one button labeled “OK”.
If the value is Abort: Display the message box with the top line reading “Error: The model is invalid. The release will be aborted.”, with the ValidationMessage, if defined, on the next line, and then show one button labeled “OK”.
If the value is Ask, is not defined, or is set to anything not defined above: Display the message box exactly as it is done today, except add “Warning: ” to the beginning of the first line and kill off the leading word, “Message: ” in front of the ValidationMessage.
The “No” button is the default.
The icons on the popup box should also be adjusted to reflect warning, error, and question respectively.
The string values (“Continue”, “Abort”, and “Ask”) are case-independent.