I have a add-in that runs when trigger check-in operation. And I'm doing some validation after that.
Is there any way to cancel check-in a file through add-in ?
If possible please let me know how to do that.
Maybe this will help you. How to cancel change state by API, I use preState event and poCmd.mbCancel flag, but this flag doesnt work ?
Short answer: Yes. Normally, I would leave it at that but this is the new year so...Long answer:
Add a hook for pre unlock event in your GetAddInInfo method:
public void GetAddInInfo(ref EdmAddInInfo poInfo, IEdmVault5 poVault, IEdmCmdMgr5 poCmdMgr)
//Notify the add-in when a file is about to be checked in
This will notify your add-in prior to a check in operation. Your addin's OnCmd will fire whenever any check-in operation occurs. You need to set the Cancel field of the EdmCmd structure to true and return.
More information here.
Best,AmenCADSharp LLC - SOLIDWORKS PDM AND API Experts
Retrieving data ...