Forum Home Forum Home > RobotStudio > RobotStudio IRC5 (5.x - )
  New Posts New Posts
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Get attached part in VSTA.

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
Klaus View Drop Down
Pickmaster members
Pickmaster members


Joined: 2003-September-01
Location: Denmark
Online Status: Offline
Posts: 226
  Quote Klaus Quote  Post ReplyReply Direct Link To This Post Topic: Get attached part in VSTA.
    Posted: 2010-July-28 at 12:59
My robot attach a Part with 3 bodies. During simulation i need to delete 2 of the buddies in the part.
 
To do that i need help to 2 examples.
 
1. Find atacched part of the robot.
2. Delete body in exixting part found in question 1.
 
VB or C#
 
 
PS. Would bee nice if VSTA/API had its own tropic
 
BR Klaus
Back to Top
Anders S View Drop Down
ABB Internal Users
ABB Internal Users


Joined: 2003-October-10
Location: Sweden
Online Status: Offline
Posts: 479
  Quote Anders S Quote  Post ReplyReply Direct Link To This Post Posted: 2010-August-05 at 11:16
Hi Klaus,
 
Try this:
 

Station actStn = Project.ActiveProject as Station;

foreach (Attachment at in actStn.Attachments)

{

  if (at.AttachmentParent.Name == "MyRobot")

 {

   GraphicComponent gc = at.AttachmentChild as GraphicComponent;

   gc.Name = "AttachedPart";

   Part p = actStn.GraphicComponents["AttachedPart"] as Part;

   Body b = p.Bodies[0];

   p.Bodies.Remove(b);

  }

}

Best regards,
Anders Spaak
ABB Robotics
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.53
Copyright ©2001-2008 Web Wiz