initial commit

This commit is contained in:
2018-11-26 21:57:59 +01:00
commit 6b55fc3eb7
12 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
(defun C:alltozero (/ i imax il ss currElem currPos newPos newElem)
;variables:
(setq i 0);counter to zero
(setq imax 1);while variable
(graphscr)
(setq ss (ssget "_A" '((0 . "insert"))));select all
(setq il (sslength ss));length of selection
(while imax
(setq currElem (entget (ssname ss i) ))
(setq currPos (assoc 10 currElem))
;; (cdr (assoc 10 currElem))
(setq newPos (list 10 0 0 0))
(setq newElem (subst newPos currPos currElem))
(entmod newElem)
;while specific:
(setq i (1+ i));increments i
(if (= i il) (setq imax nil));finish function if i equals il
)
)

View File

@@ -0,0 +1,31 @@
_.model
_.-scalelistedit
r
y
e
_.cannoscale
1:50
_.ltscale
0.2
_.change
all
p
c
bylayer
lw
bylayer
_.bindtype
1
_.-xref
b
*
(LOAD "C:/ACAD_TRUSTED/allToZero.lsp")
alltozero
_.zoom
e
(LOAD "C:/ACAD_TRUSTED/saveasPlus.lsp")
saveasplus
p
acad_

View File

@@ -0,0 +1,17 @@
(defun C:saveasplus (/ x s currPath currName savePath)
(initget 1 "Prefix Suffix")
(setq x (getkword "Prefix or suffix? [Prefix/Suffix]"))
(setq s (getstring (strcat x "?")))
(setq currPath (getvar "dwgprefix"))
(setq currName (cadr(fnsplitl (getvar "DWGname"))))
(if (= x "Prefix")
(setq savePath (strcat currPath s currName ".dwg"))
(setq savePath (strcat currPath currName s ".dwg"))
)
(command "_.saveas" "2013" savePath)
)