Main Content

添加自定义属性to Requirements

当您创建需求集时需求Toolbox™,您可以创建适用于要求集中包含的要求的自定义属性。自定义属性扩展了与您的要求关联的属性集。

定义需求集的自定义属性

为需求集定义自定义属性:

  1. 打开要求编辑。在Matlab®command prompt, enter:

    slreq.editor

  2. 点击显示要求

  3. 打开现有的需求集,或创建一个新需求集。

  4. 选择要求集。

  5. 在里面细节窗格,下自定义属性注册表, click添加to add a custom attribute to the requirement set.

  6. 自定义属性注册对话框出现。在此处输入自定义属性的名称姓名场地。Select the type from theType下拉式菜单。在此处输入自定义属性的描述Description场地。

Custom Attribute Types

有四种自定义属性类型:

  • 编辑: Text box that accepts a character array. There is no default value.

  • 复选框:可以检查或不选中的单个复选框。默认值未选中。

  • 组合框: Drop-down menu with user-defined options.Unset始终是下拉菜单和默认属性值中的第一个选项。

  • 约会时间: Text box that only accepts adatetimearray. There is no default value. Seedatetime有关更多信息datetime数组。

设置需求的自定义属性值

After you define custom attributes for a requirement set, you can set the custom attribute value for each requirement. Select the requirement in the要求编辑。在里面细节窗格,下自定义属性,在字段中输入所需值。

If you do not define a value for复选框or组合框type custom attributes for a requirement, the value will be set to the default. For复选框custom attributes, the default value is defined in the自定义属性注册表窗格的需求集。为了组合框custom attributes, the default value isUnset

编辑自定义属性

After you define a custom attribute for a requirement set, you can make limited changes to the custom attribute. To make changes, select the requirement set in the要求编辑。在里面细节窗格,下自定义属性注册表,选择要编辑的自定义属性,然后单击编辑

对于任何类型的自定义属性,您可以编辑名称和描述。为了组合框自定义属性,您还可以在下拉菜单中编辑每个选项的值,也可以添加和删除选项。如果删除选项,则为以前已将该值重置为默认值的要求的自定义属性值,Unset。立即编辑多个选项的值,以在要求集中为所有要求重置该属性的自定义属性值。但是,您可以在不重置自定义属性值的情况下编辑单个选项的值。此外,如果您在不更改任何选项的值的情况下重新排序现有选项,则需求的自定义属性值不会重置。

After you set the custom attribute value for a requirement, you can change the value by selecting the requirement in the要求编辑and setting the updated value in the自定义属性pane.

自定义属性for Referenced Requirements

When importing requirements from an external file into需求工具箱, if you selectAllow updates from external source,要求以参考要求进口(Slreq.Reference对象)。有关更多信息,请参阅Select an Import Mode

默认情况下,参考要求仅读取。尽管您可以将自定义属性添加到包含引用要求的要求集中,但您必须解锁添加自定义属性值的要求。选择引用的要求,并在细节窗格,下特性, click开锁。另外,您可以通过选择顶部导入节点,然后在细节窗格,下需求互换, clicking开锁all

If you clickUpdatein the需求互换窗格,更改您的需求集,例如新的自定义属性或新的自定义属性值。保存或导出您的需求设置文件之前Update。您可以使用Exportin the需求互换窗格将带有新自定义属性的REQIF™文件导出。

导入自定义属性

从外部源导入需求时,您还可以导入外部源中存在的自定义属性。

导入自定义属性fromreqif

你什么时候从ReqIF文件,进口需求can map information to built-in properties and custom attributes. For more information, see映射需求工具箱中的reqif属性

导入自定义属性with Direct Import fromIBMDOORSNext

When importing requirements using direct import from IBM®DOORS®Next®,接下来在门中定义的自定义属性自动导入到需求工具箱。有关接下来使用直接导入的IBM门导入要求的信息,请参见接下来与IBM门链接和跟踪要求

导入自定义属性from微软Excel

When importing requirements from a微软®Excel®file, you can map predefined headers or a row of cells to built-in properties and custom attributes. SeeImport Options for Microsoft Excel Spreadsheets

Limitations

您只能一次为一个要求设置自定义属性值。

If you copy a requirement and paste it within the same requirement set, the copied requirement retains the same custom attribute values as the original. If the requirement is pasted into a different requirement set, the copied requirement does not retain the custom attribute values.

也可以看看

相关示例

更多关于