none
Unable to add row at specified index in Shape Data section in shapesheet Visio 2013 RRS feed

  • Question

  • I am building VSTO for Visio 2013 in which I am using Shape.AddRow method in the following manner:

    shape.AddRow((short)Visio.VisSectionIndices.visSectionProp, (short)Visio.VisRowIndices.visRowFirst + 1 , (short)Visio.VisRowTags.visTagDefault);
    As defined in the documentation (https://msdn.microsoft.com/en-us/library/office/ff767317.aspx), second argument is the position at which to add the row. So I am trying to add at second position (visRowFirst + 1). But it always add row at the end of the section. Same thing is happening when I coded to add row in between other rows.

    Can anyone suggest anything or help for the same?

    Thanks in advance!

    Saturday, December 10, 2016 11:33 AM

Answers

  • Hi,

    According to Shape.AddRow Method (Visio):

    If you add rows to a section that has nameable rows (for example, the Connection Points or Controls section), the Row argument is ignored. By default, named rows are named in the order added, for example, Row_1, Row_2, and so forth. Naming order is influenced, however, by any existing rows or previously deleted rows.

     

    In your code, you are adding row at Shape Data section in which are namedRows like Prop.Row_1. So the Row argument is ignored. However, we are unable to add the row at specified index using Shape.AddNamedRow Method (Visio).

    So it is impossible to add row at specified index in Shape Data section.

    I would suggest you submit your feedback into https://visio.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by fetcch Tuesday, December 13, 2016 5:07 PM
    Monday, December 12, 2016 6:53 AM
    Moderator

All replies

  • Hi,

    According to Shape.AddRow Method (Visio):

    If you add rows to a section that has nameable rows (for example, the Connection Points or Controls section), the Row argument is ignored. By default, named rows are named in the order added, for example, Row_1, Row_2, and so forth. Naming order is influenced, however, by any existing rows or previously deleted rows.

     

    In your code, you are adding row at Shape Data section in which are namedRows like Prop.Row_1. So the Row argument is ignored. However, we are unable to add the row at specified index using Shape.AddNamedRow Method (Visio).

    So it is impossible to add row at specified index in Shape Data section.

    I would suggest you submit your feedback into https://visio.uservoice.com/

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by fetcch Tuesday, December 13, 2016 5:07 PM
    Monday, December 12, 2016 6:53 AM
    Moderator
  • Thanks for the help! :)
    Tuesday, December 13, 2016 5:08 PM