Message 1 of 3
Drawl routine to tidy up drawings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been attempting to make a stutter order to tidy up specialist drawings. I have cobbled the code beneath utilizing a combination looking through the web and irregular programming information from when I was in school. The code is inconvenient with a couple of blunder messages and prompts coming up, yet it is to some degree working.
I'm attempting to do the accompanying:
Turn on every one of the layers
Defrost every one of the layers
Select and burst all Blocks (10x)
Select and erase all Solids
Select and erase every single 3D Strong
Select and erase all Crashes
Select and erase all Aspects
Select and erase all Trapdoors
Change all article tones to "by layer"
Cleanse everything
(defun c:ARCHCLEAN ()
;drawing cleanup
(order "_.LAYON")
;turn all layers on
(order "LAYTHW")
;defrost all layers
(setq cnt 0) (rehash 10
(setq ss (ssget "_X" '((0 . "INSERT"))))
(on the off chance that ss
(progn
(order "_.burst" ss "")
(setq cnt (1+ cnt))
)
)
)
(princ)
;chooses all blocks and blasts them multiple times
(setq ss (ssget "_X" '((0 . "SOLID"))))
(if ss
(progn
(order "_.erase" ss "")
(princ)
;chooses all solids and erases them
(setq ss (ssget "_X" '((0 . "3DSOLID"))))
(if ss
(progn
(order "_.erase" ss "")
(princ)
;chooses every 3D strong and erases them
(setq ss (ssget "_X" '((0 . "WIPEOUT"))))
(if ss
(progn
(order "_.erase" ss "")
(princ)
;chooses all crashes and erases them
(setq ss (ssget "_X" '((0 . "DIMENSION"))))
(on the off chance that ss
(progn
(order "_.erase" ss "")
(princ)
;chooses all aspects and erases them
(setq ss (ssget "_X" '((0 . "HATCH"))))
(if ss
(progn
(order "_.erase" ss "")
(princ)
;chooses all trapdoors and erases them
(order "_.- layer" "_all" "_color" "bylayer" "")
(princ)
;change all articles and changes to variety by layer
(order "_.- cleanse" "all" "*" "N" "")
(princ)
;cleanses every single unused component
)