Using IEdmBatchRefVars for PDM Reference variables error

I am trying to use IEdmBatchRefVars Interface - 2022 - SOLIDWORKS API Help To get BOM Reference variable values. Using the Batch Get and Set Reference Variables Example (C#) - 2022 - SOLIDWORKS API Help example I am using:

var batch = (IEdmBatchRefVars)vault.CreateUtility (EdmUtility.EdmUtil_BatchRefVars);
but I get this error. Anyone know what is wrong?