669423907 发表于 2019-1-16 09:01:33

【已解决】请教关于选择集 错误: 参数类型错误: lselsetp nil

本帖最后由 669423907 于 2019-1-16 09:35 编辑


各位大师早上好,请教一个关于选择集出现错误的问题: 错误: 参数类型错误: lselsetp nil
不知道要改哪里file:///C:\Users\ADMINI~1\AppData\Local\Temp\G@YVKCPZR)X}3UKB(_VF`LW.gif
论坛上搜索出两条,但是没有说明具体怎么改,求助一下

(defun c:13(/ ssK ssB dim ssX ssZ ssT gy o)
(setq tz nil o nil ssK nil ssB nil dim nil ssX nil ssZ nil ssT nil gy nil)
(if (setq ss (ssget"i"))
;——————————————————————————————————————————智能修改
(progn
(setq ssK (ssget "p" '((8 . "*图框*")(0 . "lwpolyline")))) ;图框缩放

(command "Select" ss "")
(setq ssB (ssget "p" '((8 . "*表格*")(0 . "insert")))) ;图框缩放

(command "Select" ss "")
(setq dim (ssget "p" '((0 . "dimension")))) ;修改标注字高

(command "Select" ss "")
(setq ssX (ssget "p" '((8 . "*虚线*")))) ;修改线型比例

(command "Select" ss "")
(setq ssZ (ssget "p" '((8 . "*中心线*")))) ;修改线型比例

(command "Select" ss "")
(setq ssT (ssget "p" '((0 . "hatch")(2 . "~SOLID")))) ;修改填充比例

(command "Select" ss "")
(setq gy (ssget "p" '((0 . "circle,arc")))) ;改直径或加中心线

(if (and (/= ssK nil) (/= ssB nil) (= (sslength ssK)1) (= (sslength ssB)1)) (progn (setq tz 1) (ssK_sf) ) ) ;图框缩放

(if (and(not tz) (/= dim nil) (or (/= ssX nil) (/= ssZ nil) ) ) (progn (setq tz 1) (bzzg_xxbl) ) ) ;修改标注字高或线型比例

(if (and(not tz) (/= dim nil) ) (progn (if (= (sslength dim) 1) (setq tz 1) ) (sssetfirst nil dim) (bzzg) (setq tz 1) ) ) ;修改标注字高

(if (and (not tz) (/= ssX nil) ) (progn (setq tz 1) (sssetfirst nil ssX) (zxx_xxbl) ) );修改虚线比例

(if (and(not tz) (/= ssZ nil) ) (progn (setq tz 1) (sssetfirst nil ssZ) (zxx_xxbl) ) ) ;修改中心线比例

(if (and (not tz) (/= ssT nil) ) (progn (setq tz 1) (sssetfirst nil ssT) (c:h,) ) ) ;修改填充比例与角度

(if (and (not tz) (= (sslength gy)1) )
(progn (setq tz 1) (sssetfirst nil gy)
(if (getpoint "\n 左键改直径,右键加中心线")
(c:gy) (c:zxx)
) ) ;改圆或圆弧直径
(progn (sssetfirst nil gy) (c:zxx) ) ;加中心线
)

(if (not tz) (progn (sssetfirst nil ss) (c:zxx) ) ) ;加中心线(这一项无法运行,提示 错误: 参数类型错误: lselsetp nil




(setq tz nil ssK nil ssB nil dim nil ssX nil ssZ nil ssT nil gy nil)
)

(xgbzzg) ;修改标注字高

(princ))

669423907 发表于 2019-1-16 09:32:55

找到问题了 (if (and (not tz) (= (sslength gy)1) )
页: [1]
查看完整版本: 【已解决】请教关于选择集 错误: 参数类型错误: lselsetp nil