accessing objects in component groups with VSTA

Hi,

example code:

gcTray = activeStation..GraphicComponents[“FullTray_1_” + i];

This works fine as long as the graphic component is not part of a component group in Studio - how can I access the part if it is in a group?
When there are lots of them, it makes sense to use a group to keep the layout browser neat and tidy, and also to use a macro to index.

thanks.

Hi Dean,

You need to drill down the component hierarchy, something like this:

GraphicComponentGroup gcg = station.GraphicComponents["name_of_group"] as GraphicComponentGroup; GraphicComponent gc = gcg.GraphicComponents["name_of_component"];
regards,
Johannes

THANKS:+1: