none
Visio 2007, Visual Studio 2010, How to access Shape Data / custom properties from C# code ? RRS feed

  • Question

  • Hi All

    I am trying to loop through the custom properties of my shapes from C#. I am very new to this and not sure how to achieve. Can someone help me in this regard.

    Thanks in advance.


    M.S.Vittal TechMahindra Ltd
    Monday, August 22, 2011 1:31 AM

Answers

  • I got it. if I have a custom property named "Test", below code gives me my property's value.

     

    string s= shapes[1].CellsU["Prop.Test"].get_ResultStr(null);

     

     

     

     


    M.S.Vittal TechMahindra Ltd

    Thanks

    Vittal

    • Marked as answer by M S Vittal Saturday, August 27, 2011 12:20 AM
    Saturday, August 27, 2011 12:20 AM

All replies

  • Hi M.S.Vittal,

     

    Thanks for posting in the MSDN Forum.

     

    Would you please tell me whether <<I am trying to loop through the custom properties of my shapes>> means that you create a shape in Visio 2007 and set some properties on it, now you what to iterate it and retrieve its value?

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, August 23, 2011 2:10 AM
    Moderator
  • Yes Tom, I have a shape(s) in Visio 2007. Now I have to iterate through its custom properties (shape data) and retrieve its value.

    Thanks

    Vittal


    M.S.Vittal TechMahindra Ltd
    Friday, August 26, 2011 11:37 PM
  • I got it. if I have a custom property named "Test", below code gives me my property's value.

     

    string s= shapes[1].CellsU["Prop.Test"].get_ResultStr(null);

     

     

     

     


    M.S.Vittal TechMahindra Ltd

    Thanks

    Vittal

    • Marked as answer by M S Vittal Saturday, August 27, 2011 12:20 AM
    Saturday, August 27, 2011 12:20 AM