Initial commit

This commit is contained in:
2018-11-26 22:23:22 +01:00
parent 317403389d
commit 86753f6ca0
50 changed files with 4573 additions and 1 deletions

51
dimMeter.lsp Normal file
View File

@@ -0,0 +1,51 @@
(defun C:dimmeter (/ allelems goodStyleElem goodStyleList goodStyleType goodStyle ii imax ilength currElem currLength currStyle newStyle newElem)
(setq goodStyleElem (entsel "Select dimension with meter based dimstyle: "))
(setq goodStyleList (entget (car goodStyleElem)))
(setq goodStyleType (cdr(assoc 0 goodStyleList)))
(setq goodStyle (cdr(assoc 3 goodStyleList)))
(princ "\nSelected dimstyle: " )
(princ goodStyle)
(if (wcmatch goodStyleType "DIMENSION")
(progn
(setq imax 1);while variable
(setq ii 0);counter to zero
(setq allelems (ssget "x" '((0 . "DIMENSION"))))
(setq ilength (sslength allelems))
;; (print ilength)
(while imax
(print ii)
(setq currElem (entget (ssname allelems ii)))
(setq currLength (cdr (assoc 42 currElem)))
(setq currStyle (cdr (assoc 3 currElem)));; current dimension style
;; (print currLength)
(if (wcmatch currStyle goodStyle)
(print currStyle)
(if (> currLength 100)
(progn
(setq newStyle(cons 3 goodStyle))
(setq newElem(subst newStyle (assoc 3 currElem) currElem))
(entmod newElem)
)
)
)
;while specific:
(setq ii (1+ ii));increments i
(if (= ii ilength) (setq imax nil));finish function if i equals il
)
)
(princ "\nThat's not a dimension. Please select a dimension!");;else
)
(setq allelems nil)
(setq goodStyleElem nil)
)