when running the following code im getting this error:
c:\program files\autodesk\autocad 2014\acadm\amg3dim.arx cannot find a dll or other file that it needs.
Unknown command "B". Press F1 for help.
Unknown command "L-89-5". Press F1 for help.
Unknown command "N". Press F1 for help.
anyone know what this means and what would cause this?
the program works as i need it to, but im trying to eliminate these issues.
thanks for any help
(defun UpdateAtt (tagstring newvalue / newvalue ss1 tagstring)
(if (setq tagstring (strcase tagstring)
ss1 (ssget "X" '((0 . "INSERT") (66 . 1)))
)
(mapcar
(function (lambda (att) (vla-put-textstring att newvalue)))
(vl-remove-if-not
(function (lambda (att)
(= tagstring (strcase (vla-get-tagstring att)))
)
)
(apply
'append
(mapcar (function (lambda (ent)
(vlax-invoke
(vlax-ename->vla-object ent)
'GetAttributes
)
)
)
(vl-remove-if-not
(function (lambda (x) (= 'ENAME (type x))))
(apply 'append (ssnamex ss1))
)
)
)
)
)
)
)
(defun ub (/ oldblock_lst newblock_lst c oblk nblk olay ss ent elist x ip nlay)
(SETQ DS (GETVAR "DIMSCALE"))
(setvar "cmdecho" 0)
(setq oldblock_lst (list (strcase "l-89-1") (strcase "l-89-2") (strcase "l-89-3")
(strcase "l-89-5") (strcase "tag-l") (strcase "tag-m")
(strcase "tag-s")
)
)
(setq newblock_lst (list "naotag-l" "naotag-l" "naotag-m"
"naotag-s" "naotag-l" "naotag-m"
"naotag-s"
)
)
(setq C 0)
(repeat
(length oldblock_lst)
(setq oblk (nth C oldblock_lst)
nblk (nth C newblock_lst)
)
(command "_purge" "B" oblk "n") ; purge block if not visible
(if (tblsearch "block" oblk)
;;
(progn
(setq olay (getvar "clayer"))
(setq ss nil)
(setq ss (ssget "X" (list (cons 2 oblk))))
(setq ent (ssname ss 0)) ;
(setq elist (entget ent)) ; entity list
(setq x (cdr (assoc 41 elist))) ; Scale
(setq ip (cdr (assoc 10 elist))) ; Insertion point
(setq nlay (cdr (assoc 8 elist))) ; Get Block Layer
(if ss
(progn
(command "_erase" ss "") ; erase block
(command "_purge" "B" oblk "n") ; purge block
(SETVAR "CLAYER" nlay) ; make old block layer current
(command "-insert" nblk ip x "" "") ; insert new block
(SETVAR "CLAYER" olay) ; reset layer
) ; progn
) ;if ss
) ;progn
;;
); if
(setq C (+ C 1))
); repeat
(setvar "cmdecho" 1)
(princ)
)
(ub)
(UPDATEATT "JOBNO"
(substr (vl-Filename-Base
(vl-Filename-Directory (getvar "Dwgprefix"))
)
1
6
)
)
(UPDATEATT "ORDER-#"
(substr (vl-Filename-Base
(vl-Filename-Directory (getvar "Dwgprefix"))
)
1
6
)
)