Click or drag to resize
GraphicComponentGroup Class
The GraphicComponentGroup is an assembly of GraphicComponent objects.
Inheritance Hierarchy

Namespace:  ABB.Robotics.RobotStudio.Stations
Assembly:  ABB.Robotics.RobotStudio.Stations (in ABB.Robotics.RobotStudio.Stations.dll) Version: 7.0.8747.636
Syntax
C#
public class GraphicComponentGroup : GraphicComponent, 
	IAttachableParent, IHasGraphicComponents

The GraphicComponentGroup type exposes the following members.

Constructors
  NameDescription
Public methodCode exampleGraphicComponentGroup
Creates and initializes a new GraphicComponentGroup object.
Top
Properties
  NameDescription
Public propertyAttributes
Returns a collection of dynamic attributes attached to the object
(Inherited from ProjectObject.)
Public propertyChildren
Enumerates all child objects.
(Inherited from ProjectObject.)
Public propertyClipPlane
Gets or sets a ClipPlane that will hide all geometry in the negative z space of its transform.
(Inherited from GraphicComponent.)
Public propertyCode exampleColor
Gets or sets the color of the object in the graphics.
(Inherited from GraphicComponent.)
Public propertyContainingProject
Returns the Project that this object is a part of, or null if it is not part of a Project.
(Inherited from ProjectObject.)
Public propertyDetectable
Gets or sets a value indicating the the component can be detected by sensors.
(Inherited from GraphicComponent.)
Public propertyDisplayName
Gets the name of the the object that should be displayed in the GUI.
(Inherited from ProjectObject.)
Public propertyFrames
Gets a FrameCollection object that represents all the Frames on this object.
(Inherited from GraphicComponent.)
Protected propertyGfxData (Inherited from GraphicComponent.)
Public propertyCode exampleGraphicComponents
Gets a GraphicComponentCollection object that represents all the graphic components on this GraphicComponentGroup object.
Protected propertyInternalChildren (Inherited from ProjectObject.)
Protected propertyInternalParent (Inherited from ProjectObject.)
Public propertyLibrary
Returns the GraphicComponentLibrary that contains the definition of this component, or null.
(Inherited from GraphicComponent.)
Public propertyName
Gets or sets the name of the object
(Inherited from ProjectObject.)
Public propertyOpacity
Gets or sets the opacity of the object.
(Inherited from GraphicComponent.)
Public propertyCode exampleParent
The Parent property returns a reference to the parent GraphicComponent object.
(Inherited from GraphicComponent.)
Public propertyCode examplePickingEnabled
Gets or sets if the component can be picked and selected in 3D graphic windows.
(Inherited from GraphicComponent.)
Public propertyCode exampleTransform
Gets the Transform of the object.
(Inherited from GraphicComponent.)
Public propertyTypeDisplayName
Gets a localized name for the type of this object.
(Inherited from ProjectObject.)
Public propertyUIVisible
Gets or sets a value that indicates if this object should be displayed in GUI such as an object browser.
(Inherited from ProjectObject.)
Public propertyUniqueId
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.)
Public propertyCode exampleVisible
Gets or sets whether the object should be displayed in the graphics or not.
(Inherited from GraphicComponent.)
Top
Methods
  NameDescription
Protected methodAfterLoad (Inherited from GraphicComponent.)
Public methodCode exampleAttach
Attaches a child object to this GraphicComponentGroup.
Protected methodBackup (Inherited from ProjectObject.)
Protected methodBeforeSave (Inherited from ProjectObject.)
Public methodCode exampleCanAttachChild
Test if the supplied child can be attached.
Public methodCode exampleCopy
Creates a deep copy of the object.
(Inherited from GraphicComponent.)
Public methodCode exampleCopyInstance
Creates a copy but keeps a connection to the definition of the GraphicComponent, typically in a Library definition.
(Inherited from GraphicComponent.)
Public methodDelete
Deletes this object permanently.
(Inherited from GraphicComponent.)
Public methodCode exampleDeleteGeometry
Recursively deletes all CAD geometry.
(Inherited from GraphicComponent.)
Public methodDeleteGeometry(Boolean) Obsolete. (Inherited from GraphicComponent.)
Public methodCode exampleDetach
Detaches a child object from this GraphicComponentGroup.
Public methodCode exampleDisconnectFromLibrary
Moves the definition to the Station or Project. This causes the Library property to return Null.
(Inherited from GraphicComponent.)
Public methodEquals (Inherited from Object.)
Public methodExportXml(String)
Exports this to an XML file
(Inherited from GraphicComponent.)
Public methodExportXml(String, String)
Exports this to an XML file
(Inherited from GraphicComponent.)
Protected methodFinalize (Inherited from Object.)
Public methodFindObjects
Recursively finds object that satisfy a condition.
(Inherited from ProjectObject.)
Public methodGetBoundingBox(Boolean)
Computes the (axis-aligned) bounding box for this object.
(Inherited from GraphicComponent.)
Public methodCode exampleGetBoundingBox(Boolean, Vector3, Vector3) Obsolete.
Computes the (axis-aligned) bounding box for this object.
(Inherited from GraphicComponent.)
Public methodGetBoundingBox(Boolean, IntPtr, IntPtr) Obsolete. (Inherited from GraphicComponent.)
Protected methodGetGfxChildren (Inherited from GraphicComponent.)
Protected methodGetGfxMatrix (Inherited from GraphicComponent.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetMatrix (Inherited from GraphicComponent.)
Public methodCode exampleGetNormalToSurface Obsolete.
Calculates the closest point and the corresponding normal.
(Inherited from GraphicComponent.)
Public methodGetType (Inherited from Object.)
Public methodCode exampleHighlight(Boolean)
Highlights the object using the default highlight style and color.
(Inherited from GraphicComponent.)
Public methodHighlight(Boolean, Color)
Highlights the object using a specified color.
(Inherited from GraphicComponent.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMergeToPart
Copies all geometry into a single Part.
Public methodMergeToPart(IProgressCallback)
Copies all geometry into a single Part.
Public methodCode exampleMoveDefinitionToLibrary
Moves the definition to a new Library.
(Inherited from GraphicComponent.)
Protected methodNotifyChange (Inherited from ProjectObject.)
Protected methodNotifyChange(ProjectObjectChangeType) (Inherited from ProjectObject.)
Protected methodOnCreatingObject (Inherited from GraphicComponent.)
Protected methodOnDelete (Inherited from GraphicComponent.)
Protected methodOnUndoRedo (Inherited from GraphicComponent.)
Public methodScale
Scales all geometry uniformly around the origin of the group.
Public methodSetMaterial
Sets the material of the object.
(Inherited from GraphicComponent.)
Protected methodSetMatrix (Inherited from GraphicComponent.)
Public methodToString (Inherited from ProjectObject.)
Public methodCode exampleTryGetNormalToSurface
Calculates the closest point and the corresponding normal.
(Inherited from GraphicComponent.)
Top
Fields
  NameDescription
Protected field_childInstances (Inherited from GraphicComponent.)
Protected field_clipPlane (Inherited from GraphicComponent.)
Protected field_curUndoDeltaState (Inherited from ProjectObject.)
Protected field_definition (Inherited from GraphicComponent.)
Protected field_detectable (Inherited from GraphicComponent.)
Protected field_frames (Inherited from GraphicComponent.)
Protected field_pickingEnabled (Inherited from GraphicComponent.)
Protected field_source (Inherited from GraphicComponent.)
Protected field_sourceFileTime (Inherited from GraphicComponent.)
Protected field_transformMat (Inherited from GraphicComponent.)
Top
Examples
GraphicComponentGroup Example.
GraphicComponentGroup Properties Example
Project.UndoContext.BeginUndoStep("GraphicComponentGroupProperties");
try
{
    Station station = Station.ActiveStation;

    // Create the GraphicComponentGroup.
    GraphicComponentGroup myGCGroup = new GraphicComponentGroup();
    myGCGroup.Name = "myGCGroup";

    // Add the GraphicComponentGroup to the GraphicComponents of the station.
    station.GraphicComponents.Add(myGCGroup);

    // Create a part.
    Part myPart1 = new Part();
    myPart1.Name = "MyPart1";

    // Create a box and add it to myPart1.
    Body box = Body.CreateSolidBox(new Matrix4(Vector3.XVector, 0.0), new Vector3(0.4, 0.4, 0.4));
    box.Name = "MyBox";
    myPart1.Bodies.Add(box);

    // Add myPart1 to myGCGroup.
    myGCGroup.GraphicComponents.Add(myPart1);

    // Create another part.
    Part myPart2 = new Part();
    myPart2.Name = "MyPart2";

    //Create a cylinder and add it to myPart2.
    Matrix4 origin = new Matrix4(new Vector3(0.5, 0.5, 0.5), 0.0);
    Body myCylinder = Body.CreateSolidCylinder(origin, 0.2, 1);
    myCylinder.Name = "myCylinder";
    myPart2.Bodies.Add(myCylinder);

    // Add myPart1 to myGCGroup.
    myGCGroup.GraphicComponents.Add(myPart2);

    // Create a third part.
    Part myPart3 = new Part();
    myPart3.Name = "MyPart3";

    // Create a box and add it to myPart3.
    Body box2 = Body.CreateSolidBox(new Matrix4(Vector3.XVector, 0.0), new Vector3(0.1, 0.1, 0.1));
    box2.Name = "MyBox_2";
    myPart3.Bodies.Add(box2);

    // Add myPart3 to the station.
    station.GraphicComponents.Add(myPart3);

    // Attach myPart3 to myGCGroup, mount it on top of the cylinder, using an offset matrix.
    if (myGCGroup.CanAttachChild(myPart3))
    {
        myGCGroup.Attach(myPart3, true, new Matrix4(new Vector3(0.0, 0.0, 1.0)));
    }
    else
    {
        Logger.AddMessage(new LogMessage("Could not attach myPart3 to myGCGroup"));
    }
}
catch
{
    Project.UndoContext.CancelUndoStep(CancelUndoStepType.Rollback);
    throw;
}
finally
{
    Project.UndoContext.EndUndoStep();
}
Version Information

Supported in: 1.0.0.0
See Also