![RobotStudio event](https://new.abb.com/images/librariesprovider89/default-album/rs_webinar_invitation_2025_2.jpg)
accessing objects in component groups with VSTA
![Dean Thomas](https://secure.gravatar.com/avatar/67ad635db14e9e5f1408b0a19a20b339/?default=https%3A%2F%2Fus.v-cdn.net%2F5020483%2Fuploads%2Fdefaultavatar%2FK2266OAKOLNC.jpg&rating=g&size=200)
in RobotStudio
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.
0
Comments
-
Hi Dean,
You need to drill down the component hierarchy, something like this:
[code]GraphicComponentGroup gcg = station.GraphicComponents["name_of_group"] as GraphicComponentGroup;
GraphicComponent gc = gcg.GraphicComponents["name_of_component"];
[/code]
regards,
Johannes
Johannes Weiman
Software Engineer
ABB Robotics0 -
THANKS0
Categories
- All Categories
- 5.5K RobotStudio
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 323 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 812 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings