- UID
- 226527
- 积分
- 0
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2005-3-15
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
CAD帮助里的vla选择集获取方法的解释
object.Select Mode[, Point1][, Point2][, FilterType][, FilterData]
Object
SelectionSet
The object or objects this method applies to.
Mode
AcSelect enum; input-only
acSelectionSetWindow
acSelectionSetCrossing
acSelectionSetPrevious
acSelectionSetLast
acSelectionSetAll
Point1
Variant (array of doubles); input-only; optional
The 3D WCS coordinates, or array of coordinates, specifying Point1. See the mode definitions for the proper use of Point1.
Point2
Variant (three-element array of doubles); input-only; optional
The 3D WCS coordinates specifying Point2. See the mode definitions for the proper use of Point2.
FilterType
Integer; input-only; optional
A DXF group code specifying the type of filter to use.
FilterData
Variant; input-only; optional
The value to filter on.
我写了个获取选择集的代码
;;vla方法建立对象选择集vlass
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object))
*mspace* (vla-get-ModelSpace doc)
sss(vla-get-SelectionSets doc)
vlass(vla-add sss "vlaset"))
(setq pt1(vlax-3d-point (getpoint))
pt2(vlax-3d-point (getpoint)))
(setq gpcode (vlax-make-safearray vlax-vbInteger '(0 . 1));过滤表的组码
gpdata (vlax-make-safearray vlax-vbVariant '(0 . 1)));过滤表的值
(vlax-safearray-fill gpcode '(0 2))
(vlax-safearray-fill gpdata (list (vlax-make-variant "INSERT" vlax-vbString) (vlax-make-variant "TRIAN" vlax-vbString)))
;
(vla-Clear vlass);清空vlass
(vla-Select vlass acSelectionSetCrossing pt1 pt2 gpc1 gpd1);向vlass选择集中添加对象
;验证选择结果
(vlax-for x vlass
(setq en(vla-get-name x))
(princ "\n")
(princ en)
) |
|