<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
ChangeState3 Method (IEdmFile13)
See Also

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmFile13 Interface : ChangeState3 Method (IEdmFile13)

Visual Basic
C#
C++/CLI

poStateIdOrName
  Workflow state ID or name or IEdmState5 to which this file transitions

poTransitionIdOrName
  ID or name of the workflow transition to use to change states (see Remarks)

lFolderID
  ID of the file's active parent folder

bsComment
  Comment saved to the transition history

lParentWnd
  Parent window handle

lEdmStateFlags
  Optional combination of EdmStateFlags bits; default is EdmStateFlags.EdmState_Simple

bsPasswd
  Password of user executing the transition (see Remarks)

Changes the workflow state of this file.

# Syntax

Visual Basic |
--- | ---

    Sub ChangeState3( _
       ByRef poStateIdOrName As System.Object, _
       ByRef poTransitionIdOrName As System.Object, _
       ByVal lFolderID As System.Integer, _
       ByVal bsComment As System.String, _
       ByVal lParentWnd As System.Integer, _
       Optional ByVal lEdmStateFlags As System.Integer, _
       Optional ByVal bsPasswd As System.String _
    )

C# |
--- | ---

    void ChangeState3(
       ref System.object poStateIdOrName,
       ref System.object poTransitionIdOrName,
       System.int lFolderID,
       System.string bsComment,
       System.int lParentWnd,
       System.int lEdmStateFlags,
       System.string bsPasswd
    )

C++/CLI |
--- | ---

    void ChangeState3(
    &   System.Object^% poStateIdOrName,
    &   System.Object^% poTransitionIdOrName,
    &   System.int lFolderID,
    &   System.String^ bsComment,
    &   System.int lParentWnd,
    &   System.int lEdmStateFlags,
    &   System.String^ bsPasswd
    )

#### Parameters

poStateIdOrName
  Workflow state ID or name or IEdmState5 to which this file transitions
poTransitionIdOrName
  ID or name of the workflow transition to use to change states (see Remarks)
lFolderID
  ID of the file's active parent folder
bsComment
  Comment saved to the transition history
lParentWnd
  Parent window handle
lEdmStateFlags
  Optional combination of EdmStateFlags bits; default is EdmStateFlags.EdmState_Simple
bsPasswd
  Password of user executing the transition (see Remarks)

# Example

See the IEdmFile13 examples.

# Remarks

Specify poTransitionIdOrName to unambiguously specify how to transition to the new state specified by poStateIdOrName.

See Return Codes for the complete list of potential success and error codes. The following are just a few examples:

- S_OK: The method successfully executed.
- E_EDM_STATECHANGE_FAILED: The password is invalid.
- E_EDM_TRANSITION_ACTION_FAILED: One of the transition actions set up in the workflow failed.
- E_EDM_OPERATION_REFUSED_BY_PLUGIN: One of the EdmCmdType.EdmCmd_PreState hooks did not permit the operation.
- E_EDM_FILE_IS_LOCKED: The file is checked out. Changing state is only permitted on checked-in files.
- E_EDM_PERMISSION_DENIED: The logged-in user lacks permission to change state.
- E_EDM_CONDITIONS_NOT_MET: The conditions set up in the Workflow Editor for this transition were not met.
- E_EDM_STATE_NOT_FOUND: There is no transition going from the file's current state to the specified state.

# See Also

####

IEdmFile13 Interface
IEdmFile13 Members
IEdmWorkflow5 Interface

# Availability

SOLIDWORKS PDM Professional 2018