none
Is there a way to find a shape group inside a group without ungrouping parent group? RRS feed

  • Question

  • Is there a way to find a group inside a group without ungrouping the parent group? I cannot find which shape property that shows the intermediate parent, the ParentGroup property of a shape shows the toplevel group and not the intermediate group.

    I have tried to establish the hierarchy by ungrouping and then regrouping (and it works), but it is a slow process and nowhere as fast as Microsofts code for the "Selection Pane".

    Any tips are much appreciated

    Regards,

    Jon

    Tuesday, March 14, 2017 9:19 AM

Answers

  • Hello Jon,

    I have checked the object model but failed to find any methods or properties or objects to refer the subgroup. I think ungrouping and regrouping is a good workaroud.

    Besides, you may see the similar thread:

    http://stackoverflow.com/questions/32387081/getting-the-shape-group-name-inside-a-shape

    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 Jon Skaranger Wednesday, March 15, 2017 4:33 PM
    Wednesday, March 15, 2017 7:15 AM
    Moderator

All replies

  • Hello Jon,

    I have checked the object model but failed to find any methods or properties or objects to refer the subgroup. I think ungrouping and regrouping is a good workaroud.

    Besides, you may see the similar thread:

    http://stackoverflow.com/questions/32387081/getting-the-shape-group-name-inside-a-shape

    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 Jon Skaranger Wednesday, March 15, 2017 4:33 PM
    Wednesday, March 15, 2017 7:15 AM
    Moderator
  • Thanks Celeste, I just wanted to get it confirmed. I will stick to ungrouping the groups to identify the subshapes.

    (The stackoverflow example does not work for a shapes in a canvas defined as a inline shape though (as I tried it in C#). Also the ShapeRange property cannot be used like in the stackoverflow example; iterating the ShapeRange to retrieve shapes and checking for Name gives problems as ShapeRange[iShapeIndex] cannot be casted to a Shape object.

    This is OK, one simply has to manage without the ShapeRange object.  :-)      )

    I will mark your reply as the answer, thanks for your help.

    best regards,

    Jon

    Wednesday, March 15, 2017 4:33 PM