Click here to Skip to main content
15,886,835 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to add data to visio shapes (fields and values) do describe shapes programmatically using c#
The link below explains what i wanna do:
http://office.microsoft.com/en-us/visio-help/add-data-to-shapes-HP001231008.aspx[^]

if you have an exmple, it will be really appreciated to share.
Thanks to all
Posted
Updated 2-Sep-14 4:05am
v4

1 solution

i found the answer to my request.
C#
short iSection = (short)Visio.VisSectionIndices.visSectionProp;
                if (0 != visioPage2.Shapes[21].get_SectionExists(iSection, (short)Visio.VisExistsFlags.visExistsAnywhere))
                {
                    for (short iRow = 0; iRow < visioPage2.Shapes[21].get_RowCount(iSection); iRow++)
                    {
                        if (0 != visioPage2.Shapes[21].get_CellsSRCExists(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsValue, (short)Visio.VisExistsFlags.visExistsAnywhere))
                        {
                            string rowname2 = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsValue).RowNameU;
                            string cellname2 = "Prop." + rowname2;
                            string formula = visioPage2.Shapes[21].get_Cells(cellname2).FormulaU;

                            string prompt = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsPrompt).FormulaU;
                            string value = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsValue).FormulaU;
                            string label = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsLabel).FormulaU;
                            string invisibility = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsInvis).FormulaU;
                            string format = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsFormat).FormulaU;
                            string type = visioPage2.Shapes[21].get_CellsSRC(iSection, iRow, (short)Visio.VisCellIndices.visCustPropsType).FormulaU;   }}}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900