关于用包容盒 去ssget 出现的问题
D:\1 (vl-load-com) (setq model_space (Vlax-Get (Vlax-Get (Vlax-Get-Acad-Object) 'ActiveDocument) 'ModelSpace))(vlax-foritem_modelspacemodel_space ;遍历模型空间对某种块获取其包容盒
(cond
( (= "AcDbBlockReference" (Vlax-Get item_modelspace 'ObjectName ))
( cond
( (= "汇能图纸目录" (Vlax-Get item_modelspace 'EffectiveName ))
(setq qb (vlax-vla-object->ename item_modelspace))
(setq qb2 (entnext qb))
(setq num (cdr (assoc 1 (entget qb2))))
( print num)
(Vlax-Invoke-Method item_modelspace 'GetBoundingBox 'pa 'qb );
(setq z (reverse(cdr(reverse(vlax-safearray->list pa)))))
(setq d (reverse(cdr(reverse(vlax-safearray->list qb)))))
(print z)(print d)
;==========================================================================================
; (xgm z d)
(setq xx (ssget "c" z d) )
(print xx)
有些时候就能ssget 到东西 有些时候 ssget 返回nil 这是什么情况 跟系统变量有关么
求大神告知 来人啊
页:
[1]