use of 'formulaU' and 'getformula'

P

Paul Herber

In our SanDri-La application for Visio, we use a line of code (in
Delphi) :

diagramType := pagObj.PageSheet.Cells['Prop.diagram_type'].FormulaU;

where diagram_type is of type string.

This seems to work fine in with Visio 2000 and Visio 2003 in our
development environment.
However, a customer (in Italy, but using English versions of Windows
and Visio) is reporting an exception being caused by this line.

Changing the line to :

diagramType := pagObj.PageSheet.Cells['Prop.diagram_type'].GetFormula;

seems to fix this.

Can anyone shed any light on this?
MTIA.
 
M

Mark Nelson [MS]

I'm not familiar with the differences between Visual Basic and Delphi, but
it seems like you are mixing syntax. Visio has properties called Formula
and FormulaU. In VBA, these properties are accessed by name. In C++,
explicit GetFormula and SetFormula or GetFormulaU and SetFormulaU methods
are used to work with the properties. It would be helpful to clarify
whether the problem is caused by the inconsistency with Get/Set or by the
differences between local and universal syntax.

Generally, you want to write your app using universal syntax. Here are some
technical articles on the subject:
http://msdn.microsoft.com/library/d...en-us/odc_2003_ta/html/odc_landvisio02_ta.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top