CAD&BIM

Flatten a 3D Drawing 1.0.0

2021. 11. 9. 12:31
반응형
;   Flatten a 3D drawing 
;   Written by Lee Mac (http://www.lee-mac.com/)
;   This script will set all z values to zero, efectively flattening any 3D drawing. 
;
(defun c:flat ( / doc org )
   (setq doc (vla-get-activedocument (vlax-get-acad-object))
         org (vlax-3D-point 0 0 0)
   )
   (vlax-for blk (vla-get-blocks doc)
       (if (= :vlax-false (vla-get-isxref blk))
           (vlax-for obj blk
               (if (vlax-write-enabled-p obj)
                   (foreach elv '(1e99 -1e99) (vla-move obj org (vlax-3D-point 0 0 elv)))
               )
           )
       )
   )
   (vla-regen doc acallviewports)
   (princ)
)
(vl-load-com) (princ)

Flatten a 3D Drawing 1.0.0

 

This script will set all z values to zero, efectively flattening any 3D drawing. 

 

flat.lsp
0.00MB

반응형

'AutoCAD' 카테고리의 다른 글

교차점 사이의 거리 계산  (0) 2021.11.10
Block base point change  (0) 2021.11.10
2D 나무 심볼 모음  (0) 2021.11.09
임의의 점에서 원이나 호에 접하는 선 그리기  (0) 2021.11.09
치수선 값을 엑셀로 내보내기  (0) 2021.11.09

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band