Hi Markus and thanks for your reply.
I tested your mentioned code and either I still don't quite understand the purpose of the consumable state for my goal or I do it wrong.
Now I wrote a method that checks for the following things before the file is updated via the "ExplorerUtil.UpdateFileProperties" method:
- Is the file checked out by another user (yes, I saw I could also do this with the help of the EntityStatus class, but I anyways want to get the username for a more detailed output message)
if (file.CheckedOut)
{
if (file.CkOutUserId != m_serviceManager.AuthService.Session.User.Id)
{
User ckOutUser = m_serviceManager.AdminService.GetUserByUserId(file.CkOutUserId);
errorMessage = $"File is checked out to another user -> {ckOutUser.Name}";
return false; // file cannot be edited
}
}
- Is the file in obsolete or released state
LfCycState fileState = m_serviceManager.LifeCycleService.GetLifeCycleStatesByIds(new long[] { file.FileLfCyc.LfCycStateId }).FirstOrDefault();
if (fileState.ObsoleteState || fileState.ReleasedState)
{
errorMessage = $"File is in non editable state -> {fileState.DispName}";
return false; // file cannot be edited
}
- Is the file locked (this is probably already covered by checking the lifecycle state for "obsolete" and "released"?)
PropertyDefinitionDictionary propDefs = connection.PropertyManager.GetPropertyDefinitions(EntityClassIds.Files, null, PropertyDefinitionFilter.IncludeAll);
PropertyDefinition mVaultStatus = propDefs[PropertyDefinitionIds.Client.VaultStatus];
FileIteration mFileIt = new FileIteration(connection, file);
EntityStatusImageInfo mStatus = connection.PropertyManager.GetPropertyValue(mFileIt, mVaultStatus, null) as EntityStatusImageInfo;
if (mStatus.Status.LockState == EntityStatus.LockStateEnum.Locked)
{
errorMessage = "File is in locked state";
return false; // file cannot be edited
}
- Is the file in the consumable state "EntityStatus.ConsumableStateEnum.LatestConsumable"
if (mStatus.Status.ConsumableState != EntityStatus.ConsumableStateEnum.LatestConsumable)
{
errorMessage = "File is not in consumable state";
return false; // file cannot be edited ???
}
Following CAD documents that are checked-in don't return the consumable state "EntityStatus.ConsumableStateEnum.LatestConsumable" but I expect that these documents would have been updated without problems via the "ExplorerUtil.UpdateFileProperties" method:


Documents that are released and locked also return the consumable state "EntityStatus.ConsumableStateEnum.Unkown", that's why I check specifically for the lifecycle state and lock state.
So far I don't see the benefit of checking the consumable state or I'm misunderstanding you in general.
What do I understand wrong?
Thank you for your assistance!