RsWorkObject Class |
Namespace: ABB.Robotics.RobotStudio.Stations
public sealed class RsWorkObject : RsDataDeclaration, IAttachableChild
The RsWorkObject type exposes the following members.
Name | Description | |
---|---|---|
RsWorkObject |
Initializes a new instance of the RsWorkObject class.
|
Name | Description | |
---|---|---|
Attributes |
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.) | |
Children |
Enumerates all child objects.
(Inherited from ProjectObject.) | |
ContainingProject |
Returns the Project that this object is a part of, or null if it is
not part of a Project.
(Inherited from ProjectObject.) | |
DataType |
Gets the RAPID data type of the Data Declaration.
(Inherited from RsDataDeclaration.) | |
DisplayName | (Inherited from RsDataDeclaration.) | |
FrameSize |
Gets or set the size of the user and object frames in the graphics.
| |
Local |
Gets or sets if the DataDeclaration is declared local in a module. (Corresponds to the LOCAL keyword in RAPID).
(Inherited from RsDataDeclaration.) | |
ModuleName |
Gets or sets the name of the RAPID module that the DataDeclaration will be synchronized to.
(Inherited from RsDataDeclaration.) | |
Name |
Gets or sets the name of the object
(Overrides RsDataDeclarationName.) | |
ObjectFrame |
Gets a Transform that corresponds to the object frame of the work object.
| |
Parent |
Returns the objects parent, if it has one.
(Inherited from ProjectObject.) | |
RobotHold |
Gets or sets a values specifying whether or not the robot is holding the work object:
True if the robot is holding the workobject, false otherwise.
| |
ShowName |
Gets or sets whether the name of the workobject will be displayed in the graphics
| |
StorageType |
Gets or sets the RapidStorageType of the DataDeclaration
(Inherited from RsDataDeclaration.) | |
Synchronize |
Gets or sets whether the DataDeclaration should be synchronized to the VC when the referencing RsPathProcedure is.
(Inherited from RsDataDeclaration.) | |
TypeDisplayName |
Gets a localized name for the type of this object.
(Inherited from ProjectObject.) | |
UIVisible |
Gets or sets a value that indicates if this object should be displayed in GUI
such as an object browser.
(Inherited from ProjectObject.) | |
UniqueId |
Gets a persisted, globally unique identifier for this object, that can be used
to find the object using the GetObjectFromUniqueId(String) method.
(Inherited from ProjectObject.) | |
UserFrame |
Gets a Transform that corresponds to the user frame of the work object.
| |
UserFrameMechanicalUnit |
Gets or sets the name of the mechanical unit with which the robot movements are coordinated.
Only specified in the case of movable user coordinate systems (UserFrameProgrammed is False).
| |
UserFrameProgrammed | ||
Visible |
Gets or sets whether the user and object frames should be displayed in the graphics.
|
Name | Description | |
---|---|---|
Copy | (Overrides RsDataDeclarationCopy.) | |
Equals | (Inherited from Object.) | |
FindObjects |
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.) | |
GetHashCode | (Inherited from Object.) | |
GetReferencingInstructions |
Returns all RsInstructions that are referencing this DataDeclaration.
(Inherited from RsDataDeclaration.) | |
GetType | (Inherited from Object.) | |
ToString | (Inherited from ProjectObject.) |
Project.UndoContext.BeginUndoStep("RsWorkObjectExample"); try { Station station = Station.ActiveStation; // Create a RsWorkObject. RsWorkObject myWobj = new RsWorkObject(); // Get a valid RAPID name for the workobject and assign it. myWobj.Name = station.ActiveTask.GetValidRapidName("myWobj", "_", 1); // Set the frame size to twice the default size. myWobj.FrameSize = myWobj.FrameSize * 2; // Set the userframe to be a fixed coordinate system. myWobj.UserFrameProgrammed = true; // Translate the user frame. myWobj.UserFrame.X = 0.5; myWobj.UserFrame.Y = 0.2; myWobj.UserFrame.Z = 0.2; // Translate the object frame. myWobj.ObjectFrame.X = 0.5; myWobj.ObjectFrame.Y = 0.5; myWobj.ObjectFrame.Z = 0.5; // Rotate the object frame (pi radians around each axis). myWobj.ObjectFrame.RX = System.Math.PI; myWobj.ObjectFrame.RY = System.Math.PI; myWobj.ObjectFrame.RZ = System.Math.PI; // Display the wobj in the graphics. myWobj.Visible = true; // Display the name of the wobj in the graphics. myWobj.ShowName = true; // The wobj is not held by the robot. myWobj.RobotHold = false; // Add the wobj to the DataDeclarations of the ActiveTask. station.ActiveTask.DataDeclarations.Add(myWobj); // Set the wobj as the active workobject of the ActiveTask. station.ActiveTask.ActiveWorkObject = (RsWorkObject)station.ActiveTask.FindDataDeclarationFromModuleScope(myWobj.Name, myWobj.ModuleName); } catch { Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback); throw; } finally { Project.UndoContext.EndUndoStep(); }