I am trying to develop a method in vb.net of setting the workflow state permission "Read File Contents" on for every state in our vault for a specific user. I have already given that user "Read File Contents" permission for every folder in the vault, but without the matching State permission the files are still hidden. I have the user's ID and state.ID for every state but I'm failing to find the equivalent of IEdmState6.UserPermission, IEdmUser9.StatePermission or edmStatePermission. Any suggestions are greatly appreciated
For anyone interested I included the code to list all workflows and their included state names.
Private Sub WorkflowNames(ByVal Vault As IEdmVault7)
Dim WorkFlowMgr As IEdmWorkflowMgr6
Dim WorkFlow As IEdmWorkflow6
Dim state As IEdmState6
Dim pos As IEdmPos5
Dim pos2 As IEdmPos5
WorkFlowMgr = Vault
pos = WorkFlowMgr.GetFirstWorkflowPosition
While Not pos.IsNull
WorkFlow = WorkFlowMgr.GetNextWorkflow(pos)
Debug.Print(WorkFlow.Name)
pos2 = WorkFlow.GetFirstStatePosition
While Not pos2.IsNull
state = WorkFlow.GetNextState(pos2)
Debug.Print("->" & state.Name & ", ID:" & state.ID)
End While
End While
End Sub
The output looks like this:
...
Controlled Drawings
->Design, ID:30
->Engineering Review, ID:200
->Drawing Review Board, ID:202
->Pending Release Approval, ID:308
->Released, ID:344
...
Thanks
SolidworksSolidworks Pdm enterprise Pdm