AnsweredAssumed Answered

Getting Variable Values from Menu Command C#

Question asked by Sean Donnelly on Mar 31, 2017
Latest reply on Apr 3, 2017 by Tim Webb

This code is in C#. I am still learning and am very new. I am trying to work with the examples in the EPDM examples on the help website, but still can't quite figure out how to actually tell it to use the file I selected. I know I need to do something between my EnumeratorVariable vars and the vars.GetVar, but don't understand the connection between the two. The standalone makes sense to me, but not the PDM task method. Can anybody help me? If you were feeling generous perhaps you could also help with my next step: right click menu command on selected file executes a template with variables filled in already from the file you selected. One step at a time though...



public void OnCmd(ref EdmCmd poCmd, ref Array ppoData)


//Handle the menu command


string Config = "";

EdmVault5 vault = default(EdmVault5);

vault = (EdmVault5)poCmd.mpoVault;


string message = "File created by: ";

object CreatedBy = "";


IEdmEnumeratorVariable5 vars = default(IEdmEnumeratorVariable5);

vars.GetVar("CreatedBy",Config, out CreatedBy);

message += CreatedBy;


vault.MsgBox(poCmd.mlParentWnd, message);