acedSSGet 翻译

int acedSSGet(
    const ACHAR * str, 
    const void * pt1, 
    const void * pt2, 
    const struct resbuf * filter, 
    ads_name ss
);

acedads.h

const ACHAR * str 
Optional string that specifies the entity selection mode to use.  
可选字符串,指定要使用的实体选择模式。
const void * pt1 
Optional point relevant to some selection modes; or a result-buffer list that contains multiple points for the polygon or fence selection options; or an array of two strings that are replacement prompts for a :$ mode option. 
与某些选择模式相关的可选点; 或结果缓冲区列表,包含多边形或栅栏选择选项的多个点; 或者是两个字符串的数组,用于:$ 模式的自定义提示符替换提示。
const void * pt2 
Optional point relevant to some selection modes 
与某些选择模式相关的可选点。
const struct resbuf * filter 
Optional result-buffer list that enables acedSSGet() to filter the drawing to select entities of certain types or that have certain properties 
可选的结果缓冲区列表,使acedSSGet()能够以选择某些类型的实体或具有某些属性的实体过滤选择图形。
ads_name ss 
Name of the selection set 
选择集的名称。

Returns a selection set obtained by specifying one of the AutoCAD selection modes. A selection mode is specified either by prompting the AutoCAD user or by filtering the drawing database. 
返回通过指定其中一种AutoCAD选择模式获得的选择集。 通过提示AutoCAD用户或过滤绘图数据库来指定选择模式。

You must release the allocated selection set after you are finished with processing the selection. If you fail to do this the selection set will be kept on the stack until AutoCAD terminates. Since AutoCAD can only hold 128 application-based selection sets per session, the unreleased selection sets can result in failed object selections through ObjectARX.
处理完选择后,必须释放已分配的选择集。 如果未能执行此操作,选择集将保留在堆栈中,直到AutoCAD终止。 由于AutoCAD每个会话只能容纳128个基于应用程序的选择集,因此未释放的选择集可能导致通过ObjectARX选择失败。

Note 注解

Only a selection set consisting of entities from the current drawing's model space and paper space (not non-graphical objects or entities in other block definitions) can be returned by this function. 
此函数只能返回由当前图形的模型空间和图纸空间(不是非图形对象或其他块定义中的实体)中的实体组成的选择集。

The pt1 variable cannot contain points that define zero-length segments. 
pt1 变量不能包含定义零长度段的点。

For the str argument, use one of the strings listed in the following table.
对于str参数,请使用下表中列出的其中一个字符串。
译注:该参数为选择模式和选择参数字符串,在某些情况可以组合,比如单选模式 ":E:S" 。

Value of str argument 
str参数的值
Description 
描述 
NULL 
Single-point selection (if pt1 is specified) or user selection (if pt1 is also NULL)
  单点选择(如果指定了pt1)或用户选择(如果pt1也为NULL)
"I" 
The PICKFIRST set 
使用PICKFIRST选择集
"C" 
Crossing selection 
窗交选择 。
"CL" 
Object classification class 
对象分类类
"CP" 
Crossing polygon selection 
圈交选择(指定多段线内和与该多段线相交的所有对象)。
"F" 
Fence (open polygon) selection 
栏选 打开的多边形,通过该多边形边线的实体将被选择
"L" 
Last created entity 
最后创建的实体
"P" 
Previous selection set 
上一个选择集(最后创建的选择集)。
"W" 
Window selection 
窗口选择。
"WP" 
Window polygon selection 
圈围,窗口多边形选择(指定多边形内的所有对象)。
"X" 
Filter selection only 
仅筛选选择,整个数据库。如果指定了 X 选择方法,而又没有提供filter参数,则 acedSSGet 选择数据库中的所有图元,包括关闭、冻结图层中的图元和可见屏幕外的图元。
"G" 
Groups 
":$" 
Prompts supplied 
提供提示,自定义选择提示文字
":?" 
"Other" callbacks 
使用“其他”回调
":D" 
Duplicates OK 
允许重复
":E" 
Everything in aperature 
拾取框内选择,光标的对象选择拾取框中的所有对象。
":K" 
Keyword callbacks 
使用自定义 关键字回调
":N" 
Nested 
允许嵌套
":S" 
Force single object selection only 
仅允许单一选择集,仅允许选择一次。
":U" 
Enables subentity selection 
启用子实体选择
":V" 
Forces subentity selection 
强制选择子实体
":r" 
Enables entities in long transactions to be selected 
允许选择长事务中的实体
"." 
User pick 
用户选择
"#" 
Nongeometric (all, last, previous) 
非几何(全部,最后,前一个)
"A" 
All 
全部 ALL
"B" 
BOX 
框 选
"M" 
Multiple 
多次选择

Selection Method Mode Options
选择方法模式选项 介绍

NULL

If str, pt1, pt2, and filter are all NULL, acedSSGet() checks to see if there is a current PICKFIRST set. If there is, acedSSGet() returns it; otherwise, it prompts the user with AutoCAD's general Select objects prompt and waits until the user has chosen a selection set. During interactive selection, entities are highlighted on the screen, but acedSSGet()does not highlight entities that are obtained directly or with the filter argument. The acedSSGet() function does not return information about how the user chose the selection set. (The acedEntSel() and acedNEntSelP() functions obtain both an entity and a user-selected point.) If both str and pt2 are NULL but pt1 is a point, the effect is the same as a user selecting an entity by specifying a single point with the AutoCAD pointing device.
如果str,pt1,pt2和filter都是NULL,则acedSSGet()检查是否存在当前PICKFIRST集。 如果有,acedSSGet()返回它; 否则,它会提示用户使用AutoCAD的常规选择对象提示,并等待用户选择了一个选择集。 在交互式选择期间,实体在屏幕上突出显示,但acedSSGet()不突出显示直接获得的实体或使用filter参数。 acedSSGet()函数不返回有关用户如何选择选择集的信息。 (acedEntSel()和acedNEntSelP()函数同时获取实体和用户选择的点。)如果str和pt2都为NULL但pt1是一个点,则效果与用户通过指定单个选择实体的效果相同 用AutoCAD指点设备指向。

"I"

Gets the current PICKFIRST set, if there is one. If there isn't, acedSSGet() returns RTERROR. ("I" stands for "implied.") Note that the addCommand() optional flagsACRX_CMD_USEPICKSET and ACRX_CMD_REDRAW must be used in order for acedSSGet("I", ...) to work.
获取当前PICKFIRST集(如果有)。 如果没有,则acedSSGet()返回RTERROR。 (“I”代表“implied隐含。”)请注意,必须使用addCommand()可选标志ACRX_CMD_USEPICKSETACRX_CMD_REDRAW才能使acedSSGet(“I”,...)起作用。

"C"

The AutoCAD Crossing selection mode. pt1 and pt2 must be points that specify the corners of the crossing window.
AutoCAD Crossing 窗交选择模式。 pt1和pt2必须是指定交叉窗口对角的点。

"CL"

Causes AutoCAD to prompt the user to enter an object classification class name. There is no way for a program to feed a group name to acedSSGet().
使AutoCAD提示用户输入对象分类类名。 程序无法将组名提供给acedSSGet()。

"CP"

The AutoCAD Crossing Polygon selection mode. pt1 is a list of points that define the crossing polygon. pt2 must be NULL.
AutoCAD Crossing Polygon圈交选择模式。 pt1是定义交叉多边形的点列表。 pt2必须为NULL。

"F"

The AutoCAD Fence selection mode. pt1 is a list of points that define the fence. pt2 must be NULL.
AutoCAD Fence选择模式。 pt1是定义围栅的点列表。 pt2必须为NULL。

"L"

The AutoCAD Last selection mode. Selects the last entity that was created. Both pt1 and pt2 must be NULL.
AutoCAD Last最后选择模式。 选择最后创建的实体。 pt1和pt2都必须为NULL。

"P"

The AutoCAD Previous selection mode. Selects the previous selection set. Both pt1 and pt2 must be NULL.
AutoCAD Previous selection上一个选择集模式。 选择上一个选择集。 pt1和pt2都必须为NULL。

"W"

The AutoCAD Window selection mode. pt1 and pt2 must be points that specify the corners of the window.
AutoCAD窗口选择模式。 pt1和pt2必须是指定窗口对角的点。

"WP"

The AutoCAD Window Polygon selection mode. pt1 is a list of points that define the window polygon. pt2 must be NULL.
AutoCAD 窗口多边形选择(圈围)模式。 pt1是定义窗口多边形的点列表。 pt2必须为NULL。

"X"

Filter selection only.
仅筛选选择,整个数据库。如果指定了 X 选择方法,而又没有提供filter参数,则 acedSSGet 选择数据库中的所有图元,包括关闭、冻结图层中的图元和可见屏幕外的图元。

"G"

Causes AutoCAD to prompt the user to enter a group name. There is no way for a program to feed a group name to acedSSGet().
使AutoCAD提示用户输入组名。 程序无法将组名提供给acedSSGet()。

Colon Mode Options 
冒号模式选项

 

":$"

This mode option indicates that the caller has supplied new prompts as the pt1 argument. These prompts will replace AutoCAD's select objects and remove objects prompts. The new prompt strings are passed to acedSSGet() as an array of two pointers to character strings (char* prompts[2]). The string found at index 0 replaces the select objects prompt, and the string at index 1 replaces the remove objects prompt.":?"This mode option will cause the callback function set with acedSSSetOtherCallbackPtr() to be called wheneveracedSSGet() receives any text input that it cannot understand.
此模式选项表示调用者已提供新提示作为pt1参数。 这些提示将替换AutoCAD的选择对象并删除对象提示。 新的提示字符串作为两个指向字符串的指针数组传递给acedSSGet()(char *提示[2])。 在索引0处找到的字符串替换了选择对象提示符,索引1处的字符串替换了删除对象提示符。“:?”此模式选项将导致在acedSSGet()收到任何内容时调用带有acedSSSetOtherCallbackPtr()的回调函数 它无法理解的文字输入。

":A"

This mode option causes acedSSGet() to perform single pick selection in space on entities that implement a subselection filter.
此模式选项使acedSSGet()在实现子选择过滤器的实体上的空间中执行单选选择。

":D"

This mode option causes acedSSGet() to allow duplication of entities within the selection set. So, each time an entity is selected it will be added to the selection set regardless of whether or not it is already in the selection set. Warning Prior to the introduction of this mode option, all entries in selection sets were unique. Since the :D option does not guarantee that each entry will be unique, code that relies on this uniqueness should not use selection sets created with :D or else unexpected behaviour might result.":E"This mode option will cause acedSSGet() to select everything within the cursor's object selection pickbox when the user makes a selection.
此模式选项使acedSSGet()允许选择集中的实体重复。 因此,每次选择实体时,无论它是否已经在选择集中,它都将被添加到选择集中。 警告在引入此模式选项之前,选择集中的所有条目都是唯一的。 由于:D选项不保证每个条目都是唯一的,因此依赖于此唯一性的代码不应使用以下创建的选择集:否则可能会导致意外行为。“:E”此模式选项将导致acedSSGet() 当用户进行选择时,选择光标对象选择选择框中的所有内容。

":K"

This mode option will add custom keywords to the keyword list used by acedSSGet. In addition, if there is a keyword callback function pointer set in AutoCAD (set viaacedSSSetKwordCallbackPtr()) then that callback function will be called whenever acedSSGet() receives any text input that is a custom keyword. When this mode option is used, the pt2 argument to acedSSGet() must point to a string of keywords formatted in the same fashion as for acedInitGet(). acedSSGet() will use a copy of the keyword list string passed in. The ":K" keyword mechanism supports globalization in the same way that acedInitGet() does. The only difference is that in this instance you are appending your keywords to an already existing keyword list supplied by AutoCAD and the existing list has local and global keyword pairs, so you must either provide only global keywords (that is, the first character in your keyword list string is an underscore), or your keyword list must be local/global keyword pairs (that is, all of your local keywords followed by an underscore followed by all the matching global keywords).
此模式选项会将自定义关键字添加到acedSSGet使用的关键字列表中。此外,如果在AutoCAD中设置了关键字回调函数指针(通过acedSSSetKwordCallbackPtr()设置),则只要acedSSGet()接收到任何自定义关键字的文本输入,就会调用该回调函数。使用此模式选项时,acedSSGet()的pt2参数必须指向以与acedInitGet()相同的方式格式化的关键字字符串。 acedSSGet()将使用传入的关键字列表字符串的副本。“:K”关键字机制以与acedInitGet()相同的方式支持全球化。唯一的区别是,在这种情况下,您将关键字附加到AutoCAD提供的现有关键字列表中,现有列表具有本地和全局关键字对,因此您必须只提供全局关键字(即,您的第一个字符)关键字列表字符串是下划线),或者您的关键字列表必须是本地/全局关键字对(即,所有本地关键字后跟下划线,后跟所有匹配的全局关键字)。

":N"

This mode option will cause a subsequent call to acedSSNameX() to provide additional information about container blocks and transformation matrices for any entities selected during the acedSSGet() operation. The additional information will only be available for entities selected via graphical selection methods such as Window, Crossing, point pick, etc.
此模式选项将导致对acedSSNameX()的后续调用,以提供有关在acedSSGet()操作期间选择的任何实体的容器块和转换矩阵的其他信息。 附加信息仅适用于通过图形选择方法选择的实体,如窗口,交叉,点选等。

":S"

This mode option causes acedSSGet() to allow one selection only. Note When using this mode option, the "Multiple" keyword should be removed using the "-M" mode option or undesirable behavior may result if the user activates the "Multiple" keyword option.
此模式选项使acedSSGet()仅允许一个选择。 注意使用此模式选项时,应使用“-M”模式选项删除“Multiple”关键字,否则,如果用户激活“Multiple”关键字选项,可能会导致不良行为。

":U"

This mode option enables subentity selection. It cannot be combined with the duplicate (":D") or nested (":N") selection modes. In this mode, top-level entities are selected by default, but the user can attempt to select subentities by pressing the CTRL key while making the selection. This option is supported only with interactive selections, such as window, crossing, and polygon. It is not supported for all, filtered, or group selections.
此模式选项可启用子实体选择。 它不能与复制(“:D”)或嵌套(“:N”)选择模式组合使用。 在此模式下,默认情况下会选择顶级实体,但用户可以在进行选择时按CTRL键来尝试选择子实体。 仅在交互式选择中支持此选项,例如窗口,交叉和多边形。 所有,筛选或组选择都不支持它。

":V"

This mode option forces subentity selection. It treats all interactive, graphic selections performed by the user as subentity selections. The returned selection set contains subentities only. This option cannot be combined with the duplicate (":D") or nested (":N") selection modes. This option is supported only with interactive selections, such as window and crossing. It is not supported for all, filtered, or group selections.
此模式选项强制选择子实体。 它将用户执行的所有交互式图形选择视为子实体选择。 返回的选择集仅包含子实体。 此选项不能与复制(“:D”)或嵌套(“:N”)选择模式组合使用。 仅在交互式选择(例如窗口和交叉)时支持此选项。 所有,筛选或组选择都不支持它。

Keyword Filter Mode Options
关键字过滤模式选项

 

"#"

When used in a '-' list, this option removes the keywords "Last", "All", "Group", and "Previous" from the keyword list. When used in a '+' list, this option adds the keywords "Last", "All", and "Previous". Controls the addition/removal of the "Last", "All", "Group", and "Previous" keywords in the acedSSGet() keyword list."."This option uses the keyword manipulation syntax, but it controls the addition/removal of the ability of the user to "pick" with the pointing device or coordinate entry for selection. This is not an explicit keyword, but rather an implied keyword.
在“ - ”列表中使用时,此选项会从关键字列表中删除关键字“上一个”,“全部”,“组”和“上一个”。 在“+”列表中使用时,此选项会添加关键字“Last”,“All”和“Previous”。 控制在acedSSGet()关键字列表中添加/删除“Last”,“All”,“Group”和“Previous”关键字。“。”此选项使用关键字操作语法,但它控制添加/删除 用户“选择”指点设备或坐标输入以供选择的能力。 这不是明确的关键字,而是隐含的关键字。

"A"

Controls the addition/removal of the "Add" keyword in the acedSSGet() keyword list.
控制在acedSSGet()关键字列表中添加/删除“Add”关键字。

"B"

When used in a '-' list, this option removes "Box" and "Auto" from the keyword list. When used in a '+' list, this option adds "Window", Crossing", "BOX", "WPolygon", and "CPolygon" to the keyword list.
在“ - ”列表中使用时,此选项会从关键字列表中删除“Box”和“Auto”。 当在“+”列表中使用时,此选项将“Window”,“Crossing”,“BOX”,“WPolygon”和“CPolygon”添加到关键字列表中。

"M"

Controls the addition/removal of the "Multiple" keyword in the acedSSGet() keyword list. The keyword filter mode options must be grouped together and must come first in the mode string. The list takes one of these two forms: 
控制在acedSSGet()关键字列表中添加/删除“Multiple”关键字。 关键字过滤模式选项必须组合在一起,并且必须在模式字符串中排在第一位。 该列表采用以下两种形式之一:

 

It is not possible to use both a '+' and a '-' list in the same acedSSGet() call. 
在同一个acedSSGet()调用中不可能同时使用“+”和“ - ”列表。

If the mode string str begins with a "-" the keywords specified by the keyword filter mode options which follow will be removed from the following full list: 
如果模式字符串str以“ - ”开头,则后面的关键字过滤模式选项指定的关键字将从以下完整列表中删除:

"Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/Previous/Undo/AUto/Single" 

If the mode string str starts with a "+" the keywords specified by the keyword filter mode options which follow will be added to the following base list: 
如果模式字符串str以“+”开头,则后面的关键字过滤模式选项指定的关键字将添加到以下基本列表中:

"Add/Remove/Undo/Single" 

Note When using the '+' filter mode, the option to allow the user to "pick" entities on screen is not available unless the '+' keyword list includes the "." mode option. If the "." mode option is not added, then the user must enter a keyword in order to activate a selection method with which to select entities. 
使用“+”过滤器模式时,除非“+”关键字列表包含“。”,否则不允许用户在屏幕上“选择”实体的选项。 模式选项。 如果是“。” 如果未添加模式选项,则用户必须输入关键字才能激活用于选择实体的选择方法。

In addition to the "#", ".", "A", "B", and "M" keyword filter mode options, the letters "C", "F", "L", "P", and "W" may also be used to control their corresponding keywords as follows: 
除了“#”,“.”,“A”,“B”和“M”关键字过滤模式选项外,字母“C”,“F”,“L”,“P”和“W” “也可用于控制其对应的关键字如下:

"C" 
"Crossing" and "CPolygon" keywords 
“Crossing”和“CPolygon”关键字
"F" 
"Fence" keyword 
“Fence”关键字
"L" 
"Last" keyword 
“Last”关键字
"P" 
"Previous" keyword 
“Previous”关键字
"W" 
"Window" and "WPolygon" keywords 
“Window”和“WPolygon”关键字
"G" 
"Group" keyword 
“Group”关键字

In most cases, selection method mode options cannot be used in a mode string which contains keyword filter mode options or colon mode options. The only exceptions are the ":U" and ":V" colon mode options, which may be combined with selection method mode options. Colon mode options and keyword filter mode options may be used together in the same mode string (for example: "-#-W:$:?:K:N"). 
在大多数情况下,选择方法模式选项不能用于包含关键字过滤模式选项或冒号模式选项的模式字符串。 唯一的例外是“:U”和“:V”冒号模式选项,它们可以与选择方法模式选项结合使用。 冒号模式选项和关键字过滤模式选项可以在同一模式字符串中一起使用(例如:“ - # - W:$:?:K:N”)。

Note For the polygon options "CP" and "WP" (but not for "F"), acedSSGet() automatically closes the list of points. You don't need to build a list that specifies a final point that is identical to the first. 
对于多边形选项“CP”和“WP”(但不是“F”),acedSSGet()会自动关闭点列表。 您不需要构建一个列表,该列表指定与第一个点相同的最终点。

If str equals "X" but filter is NULL, acedSSGet() selects all entities in the drawing database. 
如果str等于“X”但过滤器为NULL,则acedSSGet()选择图形数据库中的所有实体。

The filter is a linked list of result buffers that specify DXF group code. You can use an filter filter list in conjunction with any of the preceding selection modes. 
过滤器是指定DXF组代码的结果缓冲区的链接列表。 您可以将过滤器过滤列表与任何前面的选择模式结合使用。

Entity names in selection sets obtained with acedSSGet() are always the names of main entities. The acedSSGet() function cannot obtain the names of subentities (block attributes and polyline vertices). For a means of obtaining subentity names, see the description of the acdbEntNext() function. 
使用acedSSGet()获得的选择集中的实体名称始终是主要实体的名称。 acedSSGet()函数无法获取子实体的名称(块属性和折线顶点)。 有关获取子实体名称的方法,请参阅acdbEntNext()函数的说明。

A selection set returned by acedSSGet() can be passed to AutoCAD with acedCmd() or acedCommand() in response to any Select objects prompt at which a selection by Last would also be valid. AutoCAD does not require the objects to be visible on the screen or to be selected by specifying a point. 
A 选择集 acedSSGet()返回的选择集可以使用acedCmd()或acedCommand()传递给AutoCAD,以响应任何Select对象提示,其中Last的选择也是有效的。 AutoCAD不要求对象在屏幕上可见或通过指定点来选择。

If acedSSGet() returns an error status code, no selection set is created. 
如果acedSSGet()返回错误状态代码,则不会创建任何选择集。

If acedSSGet() succeeds, it returns RTNORM; it returns RTERROR if no entities in the database match the specified criteria, or if the filter list contains invalid group codes. IfacedSSGet() prompts the user to select entities, it can also return RTCAN to indicate that the user canceled the request by pressing [Ctrl]+[C]. When acedSSGet() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure. 
如果acedSSGet()成功,则返回RTNORM; 如果数据库中没有实体符合指定的条件,或者过滤列表包含无效的组代码,则返回RTERROR。 如果acedSSGet()提示用户选择实体,它也可以返回RTCAN以指示用户通过按[Ctrl] + [C]取消请求。 当acedSSGet()失败时,它会将系统变量ERRNO设置为指示失败原因的值。

Note If you wish for your function to be correctly displayed in every localized version, use an underscore ("_") as a prefix, e.g. "_P". If you have multiple tags, place the underscore before the hyphen, as such: "_-M" 
如果您希望在每个本地化版本中正确显示您的功能,请使用下划线(“_”)作为前缀,例如“_P”。 如果您有多个标记,请在连字符前面放置下划线,如下所示:“_-M”

Selection Set Filter Lists
选择集过滤列表
 

When acedSSGet() filters a drawing, it scans the entire database and compares the fields of each main entity against the filter filtering list. If an entity's properties match the codes specified by filter, it is included in the returned selection set; otherwise, it is not included. Each result buffer in filter specifies a DXF group code and associated value. Unless filter includes relational or conditional codes as described in the sections 'Relational Tests' and 'Conditional Filtering' later in this topic, acedSSGet() includes an entity in the selection set only if it matches all codes specified by filter. 
当acedSSGet()过滤图形时,它会扫描整个数据库,并将每个主要实体的字段与过滤器过滤列表进行比较。 如果实体的属性与filter指定的代码匹配,则它包含在返回的选择集中; 否则,它不包括在内。 过滤器中的每个结果缓冲区指定DXF组代码和关联值。 除非过滤器包含本主题后面的“关系测试”和“条件过滤”部分中描述的关系或条件代码,否则acedSSGet()仅在匹配过滤器指定的所有代码时才在选择集中包含实体。

Name types--for example, 0 (entity type), 2 (block reference), 6 (linetype), and 8 (layer name)--can include wild cards. If the name matches the wild-card pattern, it is included in the selection set. 
名称类型 - 例如,0(实体类型),2(块引用),6(线型)和8(层名称) - 可以包括通配符。 如果名称与通配符模式匹配,则它将包含在选择集中。

The resval specified in each buffer must be the appropriate type. For example, name types are strings, such as resval.rstring; thicknesses are double-precision floating-point values, such as resval.rreal; color and attributes-follow values are short integers, such as resval.rint; and extrusion vectors are three-dimensional points resval.rpoint. 
每个缓冲区中指定的resval必须是适当的类型。 例如,名称类型是字符串,例如resval.rstring; 厚度是双精度浮点值,例如resval.rreal; 颜色和属性 - 跟随值是短整数,例如resval.rint; 和挤出矢量是三维点resval.rpoint。

Note The meaning of certain group codes can differ from entity to entity, and not all group codes are present in all entities. If a particular group code is specified in filter, entities that don't include that code are excluded from the selection set that acedSSGet() returns. 
某些组代码的含义可能因实体而异,并且并非所有组代码都存在于所有实体中。 如果在过滤器中指定了特定的组代码,则不包含该代码的实体将从acedSSGet()返回的选择集中排除。

Filterable Entities
可过滤的实体
 

Entity filter lists recognize all DXF group codes except for handles (group 5), names (the "pseudo" group code -1), and extended entity data codes (in the range 1,000-2,000). To retrieve extended entity data, a filter list must specify the data's registered application name. 
实体过滤器列表识别除句柄(组5),名称(“伪”组代码-1)和扩展实体数据代码(范围1,000-2,000)之外的所有DXF组代码。 要检索扩展实体数据,过滤列表必须指定数据的已注册应用程序名称。

The acedSSGet() call fails if the filter includes invalid group codes. The number of group codes that acedSSGet() filters recognize was increased in AutoCAD Release 12. 
如果过滤器包含无效的组代码,则acedSSGet()调用将失败。 AutoCAD Release 12中增加了acedSSGet()过滤器识别的组代码数量。

When it filters a drawing, acedSSGet() retrieves entities on the filter list criteria alone; the selection set it retrieves may include entities from both paper space and model space. However, when the selection set is passed to an AutoCAD command, only entities from the space that is currently in effect are used (the space to which an entity belongs is specified by the value of its 67 group). 
当它过滤绘图时,acedSSGet()仅检索过滤器列表标准上的实体; 它检索的选择集可以包括来自纸空间和模型空间的实体。 但是,当选择集传递给AutoCAD命令时,仅使用当前有效空间中的实体(实体所属的空间由其67组的值指定)。

Wildcard Patterns in Filter Lists
过滤列表中的通配符模式
 

Symbol names specified in filter lists--the entity type (0), block name (2), DIMSTYLE name (3), linetype (6), text style (7), and layer name (8)--can include wild-card patterns. The wildcard patterns recognized by acedSSGet() are the same as those recognized by the function acutWcMatch(). 
过滤器列表中指定的符号名称 - 实体类型(0),块名称(2),DIMSTYLE名称(3),线型(6),文本样式(7)和图层名称(8) - 可以包括 卡片图案。 acedSSGet()识别的通配符模式与函数acutWcMatch()识别的模式相同。

The wildcard character, or asterisk (*), also appears in the name of anonymous blocks. So if you try to retrieve an anonymous block, you must escape this character by preceding it with a reverse quote ('). 
通配符或星号(*)也出现在匿名块的名称中。 因此,如果您尝试检索匿名块,则必须通过在其前面加上反向引号(')来转义此字符。

Filtering for Extended Entity Data
过滤扩展实体数据
 

You can filter for extended entity data that belongs to a particular application or set of applications by specifying the -3 group code in filter. Separate multiple application names by commas. Wild cards are allowed in the string. 
您可以通过在过滤器中指定-3组代码来过滤属于特定应用程序或应用程序集的扩展实体数据。 用逗号分隔多个应用程序名称。 字符串中允许使用通配符。

Relational Tests
关系测试
 

By default, acedSSGet() selects entities that match all the criteria in the filter list. The implied relation between each item in filter is "equals." For numeric groups (integers, reals, points, and vectors) you can specify other relationships by including a special -4 result buffer that specifies a relational operator. The applies to the result buffer that immediately follows it. Relational operators are specified by strings. The following table shows the possible operators. 
默认情况下,acedSSGet()选择与过滤列表中的所有条件匹配的实体。 过滤器中每个项目之间的隐含关系是“等于”。 对于数字组(整数,实数,点和向量),您可以通过包含指定关系运算符的特殊-4结果缓冲区来指定其他关系。 适用于紧随其后的结果缓冲区。 关系运算符由字符串指定。 下表显示了可能的运算符。

Relational operators for selection set filter lists: 
选择集过滤器列表的关系运算符:

Operator 
运算符
Description  
描述
"*" 
Anything goes (always true) 
任意(总是true)
"=" 
Equals 
等于
"!=" 
Not equal to 
不等于
"/=" 
Not equal to 
不等于
"<>" 
Not equal to 
不等于
"<" 
Less than 
小于
"<=" 
Less than or equal to 
小于等于
">" 
Greater than 
大于
">=" 
Greater than or equal to 
大于等于
"&" 
Bitwise AND (integer groups only) 
按位AND与(仅限整数组)
"&=" 
Bitwise masked equals (integer groups only) 
按位 与等(仅限整数组)

The relational operators can be used in any of the following ways, depending on the group you are testing. 
关系运算符可以通过以下任何方式使用,具体取决于您正在测试的组。

 

  • All relational operators except for the bitwise operators "&" and "&=" are valid for both real- and integer-valued groups.
    除按位运算符“&”和“&=”之外的所有关系运算符对实数和整数值组都有效。
  • The bitwise operators "&" and "&=" are valid only for integer-valued groups. The result buffer that follows the bitwise must be of type RTSHORT, which is used as a mask for the integer group. The bitwise AND "&" is true if the bits set in the mask are set also in the integer group ((integer_group & mask) != 0). The bitwise masked equals "&=" is true if the mask is identical to the integer group ((integer-group ^ mask) == 0).
    按位运算符“&”和“&=”仅对整数值组有效。 按位后跟的结果缓冲区必须是RTSHORT类型,它用作整数组的掩码。 如果掩码中设置的位也在整数组中设置((integer_group&mask)!= 0),则按位AND“&”为真。 如果掩码与整数组相同((integer-group ^ mask)== 0),则按位掩码等于“&=”为真。
  • For point groups, the X, Y, and Z tests can be combined into a single string, with each separated by commas--for example, ">,>,*". If you omit an from the string (for example, "=,<>" leaves out the test), the "anything goes" "*" is assumed.
    对于点组,X,Y和Z测试可以组合成一个字符串,每个字符串用逗号分隔 - 例如,“>,>,*”。 如果省略字符串中的一个(例如,“=,<>”省略Z测试),则假设“任何事情都是”“*”。
  • Direction vectors (group type 210) can be compared only with the operators "*", "=", and "!=" (or one of the equivalent "not equals" strings).
    方向矢量(组类型210)只能与运算符“*”,“=”和“!=”(或等效的“不等于”字符串之一)进行比较。
  • You cannot use the relational operators with string groups. Use wild-card tests instead.
    您不能将关系运算符与字符串组一起使用。 请改用通配符测试。
 

Conditional Filtering
条件过滤
 

The relational operators are binary operators. You can also test groups by creating nested Boolean expressions that use the conditional operators shown in the following table. The conditional operators are specified by -4 groups, like the relational operators. They are paired and must be balanced correctly in the filter list or the acedSSGet() call fails. The number of operands that these operators can enclose depends on the operation, as shown in the table. 
关系运算符是二元运算符。 您还可以通过创建使用下表中显示的条件运算符的嵌套布尔表达式来测试组。 条件运算符由-4组指定,如关系运算符。 它们是配对的,必须在过滤列表中正确平衡,否则acedSSGet()调用将失败。 这些运算符可以包含的操作数的数量取决于操作,如表中所示。

Conditional operators for selection set filter lists: 
选择集过滤列表的条件运算符:

Starting operator 
开始运算符
Encloses 
包括
Ending operator 
结束运算符
"<AND" 
One or more operands 
一个或多个操作
"AND>" 
"<OR" 
One or more operands 
一个或多个操作
"OR>" 
"<XOR" 
Two operands 
两个操作
"XOR>" 
"<NOT" 
One operand 
一个操作
"NOT>" 

With the conditional operators, an operand is an entity field group, a relational followed by an entity field group, or a nested expression created by these operators. 
对于条件运算符,操作数是实体字段组,关系后跟实体字段组,或由这些运算符创建的嵌套表达式。

Conditional expressions that test for extended entity data (using the -3 group) can contain only -3 groups. 
测试扩展实体数据的条件表达式(使用-3组)只能包含-3个组。

The conditional operators are not case sensitive; you can also use their lowercase equivalents including , and>, , or>, , xor>, , and not>.
条件运算符不区分大小写; 你也可以使用它们的小写等价物,包括和>,或>,xor>,而不是>。

   评论? 
原文地址:https://www.cnblogs.com/edata/p/10702257.html