Changestate PDM API

Im trying to move a file from one state to another using below code.

 oFile.ChangeState(toStateName, oFolder.ID, "Moved Programmatically", 0, EdmStateFlags.EdmState_Simple)

May I know which transition it will take and perform move? or is there any way to mention which transition it has to take and perform this action?
I noticed “ChangeState3 Method (IEdmFile13)” has option to mention transition. But it requires password which is weird.

Any idea how to move state by particular transition without password.


Use this instead.


Thanks for your reply Amen Jilli. This Will it show the dialog box right? Is it possible to skip that?

@prabaharanpichaiyan you could do something like this to use the user’s response from the dialog window to determine if the state should be changed. Otherwise, if the dialog isn’t shown, the state will automatically change. You can absolutely skip showing the dialog (ShowDlg).

bool bRet = true;   // return value from shown dialog

if (showDialogWindow)
    bRet = _batchChanger.ShowDlg(winHandle);

if (bRet)

You can show the dialog box but you can also skip it.

1 Like