By Wayne Brill
Autodesk® Vault Collaboration 2012
Autodesk® Vault Professional 2012
Autodesk® Vault Workgroup 2012
I am using the RestrictOperations SDK sample. AddRestriction() is not getting added for the UpdateFileLifeCycleState event even though it is checked in the Configurator. Is there a way to get this to work in the sample?
There is a typo in Configulator tool, and was fixed in the 2013 release.
This code snippet is from Form1.cs and is a list of strings that is used to determine which event will be restricted by a call to AddRestriction(). Notice that the "c" in "UpdateFileLifecycleState" is lower case.
public partial class Form1 : Form
private List<string> m_commands =
// File commands
This code from EventHandlers.cs compares the event type name with the setting stored by Configulator tool to determine if AddRestriction() should be called. The Contains() function returns false because the commandName string is UpdateFileLifeCycleState which has an upper case "C", but the stored setting is “UpdateFileLifecycleState” which has a lower case. This causes the AddRestriction not to be called.
string commandName = eventArgs.GetType().Name;
commandName = commandName.Remove
RestrictSettings settings =
("", "Test restriction"));