表按照内容分类?
(setq aa '(1 2 3 e 4 5 6 7 e 8 9 10 11 12 13 14 e 15 16 17 18))(setq nn (length aa))
(setq lst (apply 'append (mapcar'(lambda(x)(setq aa(cdr aa)) (list(cons (- nn (length aa)) x)))aa)))
(setq pp nil)
(foreach x lst (if (equal (cdr x ) 'e) (setq pp (append pp (list (car x)))) ) )
(setq pp (append (list (car pp)) (mapcar '- (mapcar'-pp (cdr pp))) ))
(setq ptlst1 nil)
(foreach y pp
(setq ptlst nil)
(repeat y(setq ptlst (append ptlst (list(cDAR LST) ))) (setq LST(vl-remove (car LST) LST) ))
(setq ptlst1 (append ptlst1 (list ptlst) ))
)(SETQ PPP (APPEND ptlst1 (LIST (MAPCAR 'CDR LST) )))
;命令: !PPP
;((1 2 3 E) (4 5 6 7 E) (8 9 10 11 12 13 14 E) (15 16 17 18))
本帖最后由 树櫴希德 于 2023-7-10 12:26 编辑
(setq pp'((10 10 2) (6 5 1) (20 25 9) (33 32 4)(10 10 3)(6 5 4) (33 32 8) (20 25 6) (77 88 9) (25 89 40)))
(setq ppp nil)
(while pp
(foreach xx (cdr pp)
(if (and(= (car xx) (caar pp ))(= (cadr xx) (cadar pp )))
(progn (setq p1 (list (car xx) (cadr xx) (last(car pp)) (last xx)) )
(setq pp (vl-remove xx pp))
)
)
)
(setq pp (cdr pp))
(setq ppp (append ppp (list p1)))(setq p1 nil)
)
;命令:!ppp ((10 10 2 3) (6 5 1 4) (20 25 9 6) (33 32 4 8) nil nil)
(vl-remove-if'(LAMBDA (x) (= x nil))'((10 10 2 3) (6 5 1 4) (20 25 9 6)
(33 32 4 8) nil nil))
((10 10 2 3) (6 5 1 4) (20 25 9 6) (33 32 4 8))
本帖最后由 树櫴希德 于 2023-7-26 12:47 编辑
;ConstantWidth宽度
;(vlax-dump-object(vlax-ename->vla-object(car(entsel)))T).查看对象的属性和方法
;(entget(car(nentsel)))查询块内实体祖玛
;
;
;(vla-put-Color (vlax-ename->vla-object(car(nentsel)))2 )修改块内实体颜色
;(vla-put-ConstantWidth (vlax-ename->vla-object(car(nentsel)))0.01 )修改块内多段线宽度
;(vla-update (vlax-ename->vla-object(car(entsel))))更新块
知识点:
;;;查看对象的属性和方法
(vlax-dump-object obj T)
;;;方法与属性是否适用于某对象
(vlax-property-available-p obj "Property")
(vlax-method-applicable-p obj "Method")
;;;获取属性与修改属性
(vla-get-属性 obj)
(vla-put-属性 obj 参数)
(vlax-get-property obj "Property")
(vlax-put-property obj "Property" 参数)
;;;执行方法
(vlax-invoke-method obj "Method" [方法的参数]...)
例子:get
01.查看对象的属性和方法
(vlax-dump-object(vlax-ename->vla-object(car(entsel)))T)
点选一个圆
it
————————————————
版权声明:本文为CSDN博主「李白打野」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_68992719/article/details/130728648
里面有管桩机 挖掘机 旋挖机 三轴搅拌桩机等图块
本帖最后由 树櫴希德 于 2023-9-19 17:36 编辑
(setq tcc (vlax-get-property (vlax-ename->vla-object(car(nentsel))) "layer") );获取块内指定图元图层
(vl-cmdf "-layer" "off" tcc "" "") ;关闭块内指定图元图层
(vla-move (vlax-ename->vla-object(car(nentsel))) (vlax-3d-point (getpoint "\n please select a point"))(vlax-3d-point (getpoint"\n please select the second point")));移动块内实体
页:
[1]