在CAD中用LISP实现原位放大数值

 时间:2024-10-15 07:34:39

1、(defun c:fff(/ num) (princ"主要功能为原位数值放大") (setvar "cmdecho" 0) (if(= nil xsz像粜杵泳) (c:szcs)) (princ"\n当前放大系数为:")(princ xsz) (princ"\n如需重新设置请退出执行 szcs") (setq newlayer(tblsearch "layer" "WT")) (if(= newlayer nil) (command "layer" "n" "WT" "c" "2" "WT" "")) (setq nse(ssget)) (setq nse_len(sslength nse)) (setq nn 0) (repeat nse_len (setq nse_sub(ssname nse nn)) (setq nse_data(entget nse_sub)) (setq old_num_list(assoc 1 nse_data)) (setq old_layer_list(assoc 8 nse_data)); (setq num(cdr (assoc 1 nse_data))) (setq layer(cdr (assoc 8 nse_data))) (setq cal_old_num(atof num)) (setq cal_new_num(* xsz cal_old_num)) (setq new_num_list(cons 1 (rtos cal_new_num 2 1))) (setq new_lay_list(cons 8 "WT")) (setq nse_data(subst new_num_list old_num_list nse_data)) (setq nse_data(subst new_lay_list old_layer_list nse_data)) (entmod nse_data) (setq nn (+ nn 1)) (setq new_word(entlast)) ) (prin1) )(defun c:szcs() (setq xsz (getreal"放大系数")) )

2、执行_vlide命令,打开LISP编辑器,将第一步代码复制粘贴到编辑器中

3、点击加载命令

在CAD中用LISP实现原位放大数值

4、执行fff命令,如需重新设置放大系数执行SZCS

  • 肉松豌豆米糊
  • Excel中VBA data array sort数据表排列组合重构
  • excel中如何设置凹凸表格形式
  • 在scratch中绘制蓝色双扇形的方法
  • Excel怎样绘制齿轮
  • 热门搜索
    酸梅汤做法 苹果手机怎么设置铃声 多宝鱼的做法 土豆炖鸡块的家常做法 水果捞的做法 猪肚子的做法 脂肪粒怎么消除在眼睛旁边的 羊肉丸子的做法 炒腰花的家常做法 炒面的家常做法