摘要
返回所有其 Text Color 属性符合该查询的线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象。
语法
TextColor : Numeric_String
TextColor : Number
TextColor 关键字始终可以与 Numeric_String 结合使用。它也可以与 Number 结合使用,但 only 前提是:在查询表达式中通过一个或多个前置条目,已将所有其他对象(即不具有 Text Color 属性的对象)完全排除。可在表达式中使用诸如 TextColor <> '' 或 TextColor > '' 之类的条目。或者,使用专门针对端口和文本框对象的条目,例如 IsPort、IsTextFrame。
与特定数字对应的颜色可通过以下关系推导:
65536 * Blue + 256 * Green + Red
其中 Blue、Green 和 Red 分量的取值范围均为 0 到 255(含)。
当 TextColor 关键字可与 Number 结合使用时,可以使用以下结构分别计算 Text Color 属性的 Blue、Green 和 Red 分量的值:
-
Blue = Text Color Div 65536
-
Green = Text Color Div 256 Mod 256
-
Red = Text Color Mod 256
示例用法
TextColor = '0'
TextColor <> '' && TextColor = 0
返回所有其 Text Color 属性为 0 的线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象(对应 Blue = 0、Green = 0、Red = 0)。
TextColor = '32896'
TextColor > '' && TextColor = 32896
返回所有其 Text Color 属性为 32896 的线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象(对应 Blue = 0、Green = 128、Red = 128)。
TextColor <> '16777215'
返回所有对象 except 线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象,其 Text Color 属性为 16777215(对应 Blue = 255、Green = 255、Red = 255)。
IsPort Or IsTextFrame && TextColor <> 16777215
返回所有其 Text Color 属性不为 16777215 的端口或文本框对象。
TextColor > '' && TextColor Div 65536 >= 96 && TextColor Div 256 Mod 256 Between 64 And 192 && TextColor Mod 256 <= 128
返回所有其 Text Color 属性满足以下条件的线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象:Blue 分量值大于或等于 96,Green 分量值大于或等于 64 且小于或等于 192,Red 分量值小于或等于 128。
IsTextFrame && TextColor Div 65536 <= 192
返回所有其 Text Color 属性的 Blue 分量值小于或等于 192 的文本框对象。
IsPort && TextColor Mod 256 Between 64 And 192
返回所有其 Text Color 属性的 Red 分量值大于或等于 64 且小于或等于 192 的端口对象。
注释
Text Color 属性仅对线束入口(harness entry)、注释(note)、端口(port)、图纸入口(sheet entry)以及文本框(text frame)对象定义。