- (if (setq s (ssget))
- (progn
- (repeat (setq n (sslength s))
- (setq r (cons (ssname s (setq n (1- n))) r))
- )
- (vla-AppendItems
- (vla-add (vla-get-groups
- (vla-get-ActiveDocument (vlax-get-acad-object))
- )
- "*" ;;创建无名组
- )
- (vlax-make-variant
- (vlax-safearray-fill
- (vlax-make-safearray
- vlax-vbObject
- (cons 0 (1- (length r)))
- )
- (mapcar 'vlax-ename->vla-object r)
- )
- )
- )
- )
- )
|