sdk
latest
false
Developer Guide
Last updated Mar 23, 2024

UiPath.Studio.Activities.Api.Settings

In this section you can find more information on how to build activities using UiPath.Studio.Activities.Api.Settings.

IActivitiesSettingsService

Entry point for settings-related functionality.

Inheritance

IActivitiesSettingsReader > IActivitiesSettingsService

Methods

void AddCategory(SettingsCategory category)

Add a settings category in the project settings UI.

Parameter Type

Parameter Name

Description

SettingsCategory

category

The description of the settings page.

void AddSection(SettingsCategory category, SettingsSection section)

Add a section to this category.

Parameter Type

Parameter Name

Description

SettingsCategory

category

 

SettingsSection

section

If the section key does not start with the the category key, the latter is added as prefix of the former and the SettingsElement.Key value is updated.

void AddSetting(SettingsEditorControlContainer parent, SettingDescriptionBase setting)

Generates a default Settings Editor based on the Setting and passes it to AddSetting(SettingsEditorControlContainer).

Parameter Type

Parameter Name

Description

SettingsEditorControlContainer

parent

The SettingsCategory or SettingsSection where the generated setting control is appended.

SettingDescriptionBase

setting

The setting description that is used to generate a control.

void AddSetting(SettingsEditorControlContainer parent, SettingsEditorControl setting)

Add a settings control

Parameter Type

Parameter Name

Description

SettingsEditorControlContainer

parent

The SettingsCategory or SettingsSection where the generated setting control is appended.

SettingsEditorControl

setting

The setting description that is used to generate a control.

bool TrySetValue (string key, string value)

Sets and saves a setting value.

Parameter Type

Parameter Name

Description

string

key

The key of the setting.

string

value

The value of the setting.

ModernClassicSettings

Note: This feature was introduced in UiPath.Studio.Activities.Api v21.10.

Defines how an activity package prefers to handle Modern vs Classic activities. If set to UseGlobalSetting, it will defer the behavior to the global Studio setting. Having it explicitly set to either UseModern or UseClassic will result in the setting being overwritten for the particular package.

Constants

Type

Name

Description

string

UseGlobalSetting

Defers the decision to the global Studio setting.

string

UseModern

Makes the modern activities the default.

string

UseClassic

Makes the classic activities the default.

MultipleValuesSelectorDescription

A setting that allows selecting multiple values from a predefined collection of values.

Inheritance

SettingsElement > SettingDescriptionBase > MultipleValuesSelectorDescription

Properties

Type

Name

Description

string

Values

Possible values to select.

string

DefaultValues

Default selection.

SettingDescriptionBase

Format a value for display.

Inheritance

SettingsElement > SettingDescriptionBase

Properties

Type

Name

Description

string

Description

An explanation of the setting.

bool

IsReadOnly

If set to true, the value is not editable nor persisted.

bool

IsDesignTime

Returns trueif invoked at design time. Requires Studio 2021.10 or later.

string

Label

The label to use for this setting.

bool

RequiresPackageReload

If set to true, changing this setting requires a package reload. Requires Studio 2021.10 or later.

SettingDescriptionBase <T>

A setting description that applies for a certain type.

Inheritance

SettingsElement > SettingDescriptionBase > SettingDescriptionBase<T>

Generic Type T

The type of setting for which this description applies.

Properties

Type

Name

Description

Func<T, string>

GetDisplayValue

Function that needs to return a formatted display value for a given type.

SettingsControlBase

A settings element that is part of the UI.

Inheritance

SettingsElement > SettingsControlBase

Properties

Type

Name

Description

bool

IsDesignTime

Returns true when invoked at design time. Requires Studio 2021.10 or later.

bool

RequiresPackageReload

If set to true, changing this setting requires a package reload This only applies to design time settings. Requires Studio 2021.10 or later.

SettingsEditorControlBase

Settings editor. It appears as a label with an associated control. An instance of this can be passed to SettingsSection.AddSetting(SettingsEditorControl).

Inheritance

SettingsElement > SettingsControlBase > SettingsEditorControlBase

Properties

Type

Name

Description

ControlDescriptionBase

Control

The control to use for this setting.

string

Description

(Optional) A longer explanatory text for this setting, displayed as a tooltip.

string

Label

(Optional) The setting editor label. This can be a markdown text.

SettingsEditorControlContainer

A settings UI element that can host editors.

Inheritance

SettingsElement > SettingsControlBase > SettingsEditorControlContainer

SettingsElement

Base class for settings elements with associated keys.

Properties

Type

Name

Description

string

Key

The unique key associated with this setting. Used for storage/retrieval.

SettingsCategory

A settings category.

Inheritance

Properties

Type

Name

Description

string

Description

(Optional) Displayed bellow the title, explains the purpose of this page.

string

Header

The category header.

bool

IsHidden

If set to true, the category will not be displayed in the Project Settings dialog. Requires Studio 2020.4 or later.

Remarks

Adds a category in activities project settings.



SettingsSection

A settings group box containing related controls.

Properties

Type

Name

Description

string

Description

(Optional) Displayed bellow the title, an explanation the purpose of this section.

bool

IsExpanded

If set to true, the section is expanded by default.

string

Title

The section title.

Remarks

Adds a settings group box to activities project settings.

docs image

SingleValueEditorDescription

A setting entry that allows editing a single value of type T. A default editor is created based on T.

Inheritance

Generic Type T

The type of setting for which this description applies.

Properties

Type

Name

Description

T

DefaultValue

The default value of this setting.

Func<T, string>

Validate

Validate a value (applies to editors that allow free text input).

SingleValueSelectorDescription

A setting that allows selecting a single value from a predefined collection of values.

Properties

Type

Name

Description

string[]

Value

Possible values to select.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.