# 3.1.15: 选择梁 (Select Element)

可为所有结构元素设置标识符，即名称。这些名称不必是唯一的：Karamba3D中，两个元素可以使用相同的名称。在默认情况下，元素具有默认标识符：即其索引。这也是为什么在Karamba3D中不支持使用整数作为元素标识符的原因。图3.1.15.1显示了如何使用元素标识符将一个元素列表分为两个数据树。**“Select Beam（选择梁）”**&#x8FD0;算器需&#x8981;**“Elems（元素）”**&#x4E2D;的一个元素列表&#x53CA;**“Id”**&#x4E2D;的一个标识符列表或正则表达式列表。正则表达式必须&#x4EE5;**“＆”**&#x4E3A;前缀。它们代表着一个非常强大的选择工具。图3.1.15.1中列举了三个例子：

* “&.\[1-2]”：一个“.”可以匹配任意字符；“\[1-2]” 匹配范围从“1”到“2”的一个字符。亦等效于“\[12]”。
* “\&b.”：可以匹配任何以“b”开头且后面有任意字符的标识符。
* “&.\[13]”:可以匹配任何以任意字符开头且后有“1”或“3”的标识符。

![图3.1.15.1：可使用标识符选择元素](/files/-M9XuW2Cq5HMqckb3O5z)

**“Select Beam（选择梁）”**&#x8FD0;算器上有两个输出端口：**“（SElem）”**&#x6E32;染符合选择标准的所选元素，**“RElem”**&#x5219;反馈其余元素。**“SElem”**&#x548C;**“RElem”**&#x7684;输出数据条目会记住它们在原始元素列表中的位置，并将其结果按照元素的原始顺序连接。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual-1-3.karamba3d.com/chinese_1_3_3/3-in-depth-component-reference/3.1-model/3.1.15-select-beam.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
