UiPath Documentation
marketplace
latest
false
Marketplace 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

方向

活动属性的方向类型,包括“输入”、“输出”、“输入/输出”和“无”,以及每种属性的使用时间。

属性可以指向四个方向:

  • In:最常见。 用于输入参数。
  • 输出:用于输出参数,即活动的结果。
  • “输入输出”:很少使用,但在接收数据、修改数据并输出数据以供其他活动使用的活动中非常方便。
  • “无”:布尔值和枚举等独立类型不需要方向。 创建这些类型的属性时,请使用“无”。
    备注:

    Note that Out and InOut properties can only accept variables, not literal values, in UiPath Studio. This makes sense since the activity needs something to which the outputted value can be written.

Activity Creator​

生成的代码​

The Argument direction is seen in the declaration of each property. Notice that FirstNumber and SecondNumber are both InArguments while Sum is an OutArgument.

... #region Properties
            [LocalizedDisplayName(nameof(Resources.Addition_FirstNumber_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_FirstNumber_Description))]
            [LocalizedCategory(nameof(Resources.Input_Category))] public InArgument<int>
            FirstNumber { get; set; }
            [LocalizedDisplayName(nameof(Resources.Addition_SecondNumber_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_SecondNumber_Description))]
            [LocalizedCategory(nameof(Resources.Input_Category))] public InArgument<int>
            SecondNumber { get; set; }
            [LocalizedDisplayName(nameof(Resources.Addition_Sum_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_Sum_Description))]
            [LocalizedCategory(nameof(Resources.Output_Category))] public OutArgument<int> Sum
            { get; set; } #endregion ...
... #region Properties
            [LocalizedDisplayName(nameof(Resources.Addition_FirstNumber_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_FirstNumber_Description))]
            [LocalizedCategory(nameof(Resources.Input_Category))] public InArgument<int>
            FirstNumber { get; set; }
            [LocalizedDisplayName(nameof(Resources.Addition_SecondNumber_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_SecondNumber_Description))]
            [LocalizedCategory(nameof(Resources.Input_Category))] public InArgument<int>
            SecondNumber { get; set; }
            [LocalizedDisplayName(nameof(Resources.Addition_Sum_DisplayName))]
            [LocalizedDescription(nameof(Resources.Addition_Sum_Description))]
            [LocalizedCategory(nameof(Resources.Output_Category))] public OutArgument<int> Sum
            { get; set; } #endregion ...

UiPath Studio 中的效果​

将鼠标悬停在“属性”窗格中的每个属性上即可查看其方向。

  • Activity Creator​
  • 生成的代码​
  • UiPath Studio 中的效果​

此页面有帮助吗?

连接

需要帮助? 支持(opens in new window)

想要了解详细内容? UiPath Academy(opens in new window)

有问题? UiPath 论坛(opens in new window)

保持更新