💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
来自 [链接](http://bbs.mjtd.com/forum.php?mod=viewthread&tid=108656&extra=page%3D3%26filter%3Dtypeid%26typeid%3D107&page=1) 效果图 ![](https://box.kancloud.cn/f72f2f383051668c8c1fd86b9cf76653_790x532.gif) 源码: ``` ;;by Gu\_xl (defun c:ng:scale (/ sc a b temp) (if (null oldscale) (setq oldscale 2.0)) (initget 6) (setq sc (getreal (strcat "\\n缩放倍数<" (rtos oldscale 2 2)">:"))) (if (null sc) (setq sc oldscale) (setq oldscale sc)) (while (ssget) (vlax-for obj (vla-get-ActiveSelectionSet (vla-get-ActiveDocument (vlax-get-acad-object))) (if (not (VL-CATCH-ALL-ERROR-P (VL-CATCH-ALL-APPLY 'vla-GetBoundingBox (list obj 'a 'b)))) (progn (vla-ScaleEntity obj (vlax-3d-point (mapcar '\* '(0.5 0.5 0.5) ;;这是原作者的写法 ; (apply 'mapcar ; (cons '+ ; (mapcar 'vlax-safearray->list (list a b))) ; ) ;;这是修改后的写法 (mapcar '+ (car (setq temp (mapcar 'vlax-safearray->list (list a b)))) (cadr temp) ) ) ) sc ) ) ) ) ) (princ) ) ```