Search Results for

    Show / Hide Table of Contents

    Class SmartComponent

    Represents a GraphicComponent that contains Properties, I/O Signals, Assets and other GraphicComponents. The behavior of the component is implemented by Code Behind.

    Inheritance
    object
    ProjectObject
    GraphicComponent
    SmartComponent
    Implements
    IHasTransform
    IHasFrames
    IAttachableChild
    ISupportCopy
    IAttachableParent
    IHasGraphicComponents
    IHasIOSignals
    IHasIOConnections
    IHasDynamicProperties
    IHasPropertyBindings
    IHasAssets
    Inherited Members
    GraphicComponent.SetMaterial(Material, bool)
    GraphicComponent.Copy()
    GraphicComponent.CopyInstance()
    GraphicComponent.MoveDefinitionToLibrary()
    GraphicComponent.Delete()
    GraphicComponent.Highlight(bool)
    GraphicComponent.Highlight(bool, Color)
    GraphicComponent.DisconnectFromLibrary()
    GraphicComponent.DeleteGeometry()
    GraphicComponent.TryGetNormalToSurface(Vector3, out Vector3, out Vector3, out Face)
    GraphicComponent.GetBoundingBox(bool)
    GraphicComponent.ImportAsync(string)
    GraphicComponent.ImportAsync(string, GraphicImportSettings, IProgressCallback)
    GraphicComponent.CanImport(string)
    GraphicComponent.ImportXmlAsync(string, string, string, string)
    GraphicComponent.ImportXmlAsync(string, string, Dictionary<string, string>)
    GraphicComponent.ImportXmlAsync(string, string)
    GraphicComponent.ImportXmlAsync(string)
    GraphicComponent.ExportXml(string, string)
    GraphicComponent.ExportXml(string)
    GraphicComponent.Parent
    GraphicComponent.Library
    GraphicComponent.Transform
    GraphicComponent.IsTransient
    GraphicComponent.Visible
    GraphicComponent.Color
    GraphicComponent.Opacity
    GraphicComponent.PickingEnabled
    GraphicComponent.Detectable
    GraphicComponent.ClipPlane
    GraphicComponent.Frames
    GraphicComponent.Annotations
    GraphicComponent.PhysicsMotionControl
    ProjectObject.FindObjects(Predicate<ProjectObject>, Predicate<ProjectObject>)
    ProjectObject.ToString()
    ProjectObject.Name
    ProjectObject.ContainingProject
    ProjectObject.Attributes
    ProjectObject.UIVisible
    ProjectObject.TypeDisplayName
    ProjectObject.UniqueId
    ProjectObject.Children
    ProjectObject.ProjectObjectChanged
    ProjectObject.InternalEvent
    Namespace: ABB.Robotics.RobotStudio.Stations
    Assembly: ABB.Robotics.RobotStudio.Stations.dll
    Syntax
    [Persistent("SmartComponentInstance")]
    public sealed class SmartComponent : GraphicComponent, IHasTransform, IHasFrames, IAttachableChild, ISupportCopy, IAttachableParent, IHasGraphicComponents, IHasIOSignals, IHasIOConnections, IHasDynamicProperties, IHasPropertyBindings, IHasAssets

    Constructors

    View Source

    SmartComponent()

    Creates and initializes a new SmartComponent object.

    Declaration
    public SmartComponent()

    Properties

    View Source

    Assets

    Gets an AssetCollection that represents all the assets of this SmartComponent object.

    Declaration
    public AssetCollection Assets { get; }
    Property Value
    Type Description
    AssetCollection

    The AssetCollection that represents all the assets of this SmartComponent object.

    View Source

    Bindings

    Gets an PropertyBindingCollection object that represents all the bindings of this SmartComponent object.

    Declaration
    public PropertyBindingCollection Bindings { get; }
    Property Value
    Type Description
    PropertyBindingCollection

    The PropertyBindingCollection that represents all the bindings of this SmartComponent object.

    View Source

    CanBeSimulated

    Gets or sets a value that indicates whether this SmartComponent object can be simulated, e.g. if the code behind implements the SimTime methods.

    Declaration
    public bool CanBeSimulated { get; set; }
    Property Value
    Type Description
    bool
    View Source

    CodeBehindLocation

    Gets or sets the the location of the SmartComponentCodeBehind class associated with this component.

    Declaration
    public string CodeBehindLocation { get; set; }
    Property Value
    Type Description
    string

    A string in the format [Type name],[Assembly name].

    See Also
    SmartComponentCodeBehind
    View Source

    CodeBehindStatus

    Gets the status of the code behind assembly for this component.

    Declaration
    public CodeBehindStatus CodeBehindStatus { get; }
    Property Value
    Type Description
    CodeBehindStatus
    View Source

    Connections

    Gets an IOConnectionCollection that represents all the I/O connections on this SmartComponent object.

    Declaration
    public IOConnectionCollection Connections { get; }
    Property Value
    Type Description
    IOConnectionCollection
    View Source

    Description

    Gets a localized description for this SmartComponent object.

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    string
    View Source

    DisplayName

    Gets the name of the the object that should be displayed in the GUI.

    Declaration
    public override string DisplayName { get; }
    Property Value
    Type Description
    string
    Overrides
    ProjectObject.DisplayName
    View Source

    GraphicComponents

    Gets a GraphicComponentCollection that represents all the graphic components in this SmartComponent object.

    Declaration
    public GraphicComponentCollection GraphicComponents { get; }
    Property Value
    Type Description
    GraphicComponentCollection

    The GraphicComponentCollection that represents all the graphic components on this SmartComponent object.

    View Source

    IOSignals

    Gets an IOSignalCollection that represents all the I/O signals on this SmartComponent object.

    Declaration
    public IOSignalCollection IOSignals { get; }
    Property Value
    Type Description
    IOSignalCollection
    View Source

    IsBaseComponent

    Returns true if this is a built-in base component.

    Declaration
    public bool IsBaseComponent { get; }
    Property Value
    Type Description
    bool
    View Source

    IsEditable

    Returns true if IsProtected is false and IsBaseComponent is false and Library is null.

    Declaration
    public bool IsEditable { get; }
    Property Value
    Type Description
    bool
    View Source

    IsProtected

    Gets or sets a value that indicates if the internal structure of this component should be hidden in the GUI, and if the component should be locked for editing.

    Declaration
    public bool IsProtected { get; set; }
    Property Value
    Type Description
    bool
    View Source

    LanguageOverride

    Forces this component to use the specified language for resources rather than the language set in Options.

    Declaration
    public string LanguageOverride { get; set; }
    Property Value
    Type Description
    string
    View Source

    PerInstanceCodeBehind

    Gets or sets a value that specifies if the SmartComponentCodeBehind class should be instantiated once per smart component instance. By default the class is instantiated once, as a singleton.

    Declaration
    public bool PerInstanceCodeBehind { get; set; }
    Property Value
    Type Description
    bool
    See Also
    SmartComponentCodeBehind
    View Source

    Properties

    Gets a DynamicPropertyCollection that represents all the properties of this SmartComponent object.

    Declaration
    public DynamicPropertyCollection Properties { get; }
    Property Value
    Type Description
    DynamicPropertyCollection

    The DynamicPropertyCollection that represents all the properties of this SmartComponent object.

    View Source

    RoleObject

    Gets or sets an object that defines the role of this SmartComponent.

    Declaration
    public GraphicComponent RoleObject { get; set; }
    Property Value
    Type Description
    GraphicComponent

    A GraphicComponent that must be a child of this SmartComponent.

    Remarks

    This property may be used in different scenarios to have the SmartComponent inherit certain characteristics of a child object. For example, attaching a SmartComponent with a Tool as RoleObject to a Robot should cause ToolData(s) to be created.

    View Source

    SavedStates

    Gets a SavedStateCollection that contains saved states for this object.

    Declaration
    public SavedStateCollection SavedStates { get; }
    Property Value
    Type Description
    SavedStateCollection
    View Source

    StateCache

    Returns a collection that can be used by code behind to cache state information for this SmartComponent object.

    Declaration
    public Dictionary<string, object> StateCache { get; }
    Property Value
    Type Description
    Dictionary<string, object>
    Remarks

    The cache is automatically cleared when Undo or Redo is performed.

    Methods

    View Source

    AfterLoad(PimDocument)

    Declaration
    protected override void AfterLoad(PimDocument doc)
    Parameters
    Type Name Description
    PimDocument doc
    Overrides
    GraphicComponent.AfterLoad(PimDocument)
    View Source

    Attach(IAttachableChild, bool, Matrix4)

    Attaches a child object to this SmartComponent.

    Declaration
    public bool Attach(IAttachableChild child, bool mount, Matrix4 offset)
    Parameters
    Type Name Description
    IAttachableChild child

    The child to be attached.

    bool mount

    Specifies whether the child should be mounted, i.e. moved, on to the location of the parent

    Matrix4 offset

    Specifies the offset matrix to be used from the attachment point. This is only used when mount is set to True.

    Returns
    Type Description
    bool

    True, if the attachmet succeded

    View Source

    BeforeSave(PimDocument)

    Declaration
    protected override void BeforeSave(PimDocument doc)
    Parameters
    Type Name Description
    PimDocument doc
    Overrides
    ProjectObject.BeforeSave(PimDocument)
    View Source

    CanAttachChild(IAttachableChild)

    Test if the supplied child can be attached.

    Declaration
    public bool CanAttachChild(IAttachableChild child)
    Parameters
    Type Name Description
    IAttachableChild child

    The child to be tested.

    Returns
    Type Description
    bool

    True, if the supplied child can be attached, false otherwise

    View Source

    Detach(IAttachableChild)

    Detaches a child object from this SmartComponent.

    Declaration
    public bool Detach(IAttachableChild child)
    Parameters
    Type Name Description
    IAttachableChild child

    The child to be detached.

    Returns
    Type Description
    bool

    True, if the detachment succeded

    View Source

    GetCollectionObjects(ProjectObject)

    Returns the objects contained by a SmartComponent that represents a collection.

    Declaration
    public static IEnumerable<ProjectObject> GetCollectionObjects(ProjectObject projectObject)
    Parameters
    Type Name Description
    ProjectObject projectObject
    Returns
    Type Description
    IEnumerable<ProjectObject>

    Objects in the collection, or projectObject itself if it is not a collection

    View Source

    GetResourceString(string)

    Returns a localized resource string

    Declaration
    public string GetResourceString(string id)
    Parameters
    Type Name Description
    string id

    String id in the resource asset

    Returns
    Type Description
    string

    Localized string, or String.Empty if the id was not found

    View Source

    InitializeCodeBehind()

    Initializes the associated SmartComponentCodeBehind, if it exists. If this Smart Component has an associated Code Behind Assembly is necessary to call this method before a Smart Component is saved to library. The Code Behind assembly will be loaded, if its not already loaded, and the OnInitialize(SmartComponent) method will be called.

    Declaration
    public void InitializeCodeBehind()
    View Source

    OnCreatingObject()

    Declaration
    protected override void OnCreatingObject()
    Overrides
    GraphicComponent.OnCreatingObject()
    View Source

    OnDefinitionChanged()

    Declaration
    protected override void OnDefinitionChanged()
    Overrides
    GraphicComponent.OnDefinitionChanged()
    View Source

    RaiseIOSignalChanged(IOSignal)

    Raises the IOSignalChanged event. Call this method to force update of the GUI of a signal.

    Declaration
    public void RaiseIOSignalChanged(IOSignal signal)
    Parameters
    Type Name Description
    IOSignal signal
    View Source

    RaisePropertyChanged(DynamicProperty)

    Raises the PropertyChanged event. Call this method to force update of the GUI of a property.

    Declaration
    public void RaisePropertyChanged(DynamicProperty prop)
    Parameters
    Type Name Description
    DynamicProperty prop

    Events

    View Source

    IOSignalChanged

    Raised when any property except Value changes on one of the signals in the IOSignals collection

    Declaration
    public event IOSignalChangedEventHandler IOSignalChanged
    Event Type
    Type Description
    IOSignalChangedEventHandler
    View Source

    IOSignalValueChanged

    Raised when the Value property changes on one of the signals in the IOSignals collection

    Declaration
    public event IOSignalChangedEventHandler IOSignalValueChanged
    Event Type
    Type Description
    IOSignalChangedEventHandler
    View Source

    PropertyChanged

    Raised when any property except Value changes on one of the properties in the Properties collection

    Declaration
    public event DynamicPropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    DynamicPropertyChangedEventHandler
    View Source

    PropertyValueChanged

    Raised when the Value property changes on one of the properties in the Properties collection

    Declaration
    public event DynamicPropertyChangedEventHandler PropertyValueChanged
    Event Type
    Type Description
    DynamicPropertyChangedEventHandler

    Implements

    IHasTransform
    IHasFrames
    IAttachableChild
    ISupportCopy
    IAttachableParent
    IHasGraphicComponents
    IHasIOSignals
    IHasIOConnections
    IHasDynamicProperties
    IHasPropertyBindings
    IHasAssets
    • View Source
    In this article
    Back to top Copyright © 2026 ABB Robotics