06-04-2013 11:22 AM
I'm using C# to develop a custom user interface and I'm trying to figure out how to pass a format expression (ie. "%ProgressTextLongName% %ProgressPercentLongName%") to the CaptionSources.CaptionSource_MacroExpression using
AxExecutionViewMgr's ConnectCaption() method and CaptionConnection's FormatExpression property. I'm using the following code to do so:
CaptionConnection cc = axExecutionViewMgr.ConnectCaption(axLabel2, CaptionSources.CaptionSource_MacroExpression, true); cc.FormatExpression = "%ProgressTextLongName% %ProgressPercentLongName%";
But all the label says is "The expression cannot be empty". It says this even though I perform an execution of a sequence. Are there any examples that show how to use this macro expression anywhere?
Solved! Go to Solution.
06-04-2013 11:32 AM
Just a guess, but since it is an expression, it probably needs quotes to make it a valid string expression:
cc.FormatExpression = "\"%ProgressTextLongName% %ProgressPercentLongName%\'";
06-05-2013 11:07 AM
That worked! Thanks!