lisp修改上一个图素_修改图块基点(已解决) - AutoLISP/Visual LISP 编程技术 - CAD论坛 - 明经CAD社区 - Powered by Discuz!...

;;;图块基点修改 ,但图块实际位置保持不变

;;;明经通道 编制 By Gu_xl 2011年7月

(defun c:CBB () (c:BlockBase))

(defun c:BlockBase (/ loop base)

(while (and

(setq en (car (entsel "\n 选择一个图块:" )))

(= "INSERT" (cdr (assoc 0 (entget en))))

)

(setq base (cdr (assoc 10 (entget en))))

(sssetfirst nil (ssadd en))

(setq pt (getpoint base "\n 图块新基点"))

(if pt (gxl-BlockBaseEdit en pt))

;(sssetfirst)

)

)

(defun gxl-BlockBaseEdit (InsertEName      newInsPt1

/         BlockToInsertXform

InsertToBlockXform

BlockToInsertSetup

VectorCrossProduct

3DTransformAB    3DTransformBA

blks        LOOP

sel        BlockName

blkdef        oldInsPt1

oldInsPt2        newInsPt2

ss        idx

XformSpec atts att *ACDOCUMENT*

)

(setq *ACDOCUMENT* (vla-get-ActiveDocument (vlax-get-acad-object)))

;;;子程序

(defun BlockToInsertXform (P1 TransformSpec)

(3dTransformAB

(nth 0 TransformSpec)

(nth 1 TransformSpec)

(nth 2 TransformSpec)

(nth 3 TransformSpec)

(nth 4 TransformSpec)

P1

) ;_ end 3dTransformAB

) ;_ end defun

(defun InsertToBlockXform (P1 TransformSpec)

(3dTransformBA

(nth 0 TransformSpec)

(nth 1 TransformSpec)

(nth 2 TransformSpec)

(nth 3 TransformSpec)

(n

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值