1

I would like to get / set my shape data properties in C# of my own object or an already created object with some shape data defined.

Data=shape.Cells["User.Level"].ToString();

I have tried this and no result. Also this:

Data=shape.Cells["Prop.Level"].FormulaU="1";

Can anyone provide the right code?

ronconsoda
  • 117
  • 3
  • 15

1 Answers1

1

Finally I have solved this way. Forever alone!

private void GetValueOfCustomShapeData(Shape shape, string LabelToSearch)
{
  short iRow = (short)VisRowIndices.visRowFirst;

  // While there are stil rows to look at.
  while (shape.get_CellsSRCExists((short)VisSectionIndices.visSectionProp,iRow,(short)VisCellIndices.visCustPropsValue,(short)0) != 0)
  {
    // Get the label and value of the current property.
    string label = shape.get_CellsSRC(
                          (short)VisSectionIndices.visSectionProp,
                          iRow,
                          (short)VisCellIndices.visCustPropsLabel
                          ).get_ResultStr(VisUnitCodes.visNoCast);

    string value = shape.get_CellsSRC(
                           (short)VisSectionIndices.visSectionProp,
                           iRow,
                           (short)VisCellIndices.visCustPropsValue
                           ).get_ResultStr(VisUnitCodes.visNoCast);

    string strProperties = shape.Name + " - " + label + " - " + value;

    MessageBox.Show(strProperties);

    // Move to the next row in the properties
    section.iRow++;
}
Avilan
  • 608
  • 2
  • 6
  • 23
ronconsoda
  • 117
  • 3
  • 15