A bit sad that the OP does not give an update.
sorry for the late answers. coronavirus times.
I was testing the lisp published but I do nothing, at least I can not show any change. I already tested it in multiple files, no luck.
The following is really crude and complete with warts but it's been a long day and I'm out of gas.
Seems to work on the drawings I tested:
(defun c:fixmeyo ( / getbb make fixmeyo ss i )
(defun getbb ( o / a b )
(vl-catch-all-apply 'vlax-invoke-method (list o 'getboundingbox 'a 'b))
(if a (mapcar 'vlax-safearray->list (list a b)))
)
(defun make ( d )
(entmake
(vl-remove nil
(mapcar
'(lambda ( p / k v )
(cond
((eq 'ename (type (setq v (cdr p)))) nil)
((eq 5 (setq k (car p))) nil)
((member k '(41 42 43)) (cons k (abs v)))
((eq 210 k) (cons k (mapcar 'abs v)))
(p)
)
)
d
)
)
)
)
(defun fixmeyo ( e / d o b p r a e! o! )
(setq
d (entget e)
o (vlax-ename->vla-object e)
b (getbb o)
p (vlax-get o 'insertionpoint)
r (vlax-get o 'rotation)
a (vl-catch-all-apply 'eval '((mapcar 'vlax-vla-object->ename (vlax-invoke o 'getattributes))))
)
(if (listp a)
(progn
(make d)
(mapcar 'make (mapcar 'entget a))
(entmake '((0 . "SEQEND")(100 . "AcDbEntity")(8 . "0")))
)
(make d)
)
(if (/= e (setq e! (entlast)))
(progn
(vlax-put (setq o! (vlax-ename->vla-object e!)) 'insertionpoint p)
(if (not (equal 0.0 r 1.0e-5)) (vlax-put o! 'rotation (+ pi r)))
(entdel e)
(if (vl-some 'minusp (mapcar '(lambda (k) (cdr (assoc k d))) '(41 42 43)))
(vlax-put o! 'insertionpoint
(mapcar '+
(vlax-get o! 'insertionpoint)
(mapcar '- (car b) (car (getbb o!)))
)
)
)
)
)
)
(if (setq ss (ssget "x" '((0 . "insert")(-4 . "<or")(210 0.0 0.0 -1.0)(41 . -1.0)(42 . -1.0)(-4 . "or>"))))
(repeat (setq i (sslength ss))
(fixmeyo (ssname ss (setq i (1- i))))
)
)
(princ)
)
Use | Abuse | Retry | Abort | Ignore
Cheers.
please, explain us a bit how this lisp works. I did not noticed any change when the lisp is activated.
-------
basically What I tried explain is that is need to replicate, delete selected blocks and reinsert since 0 with same properties, not do ctrl+z or command OOPS, with the next steps:
1 export your data with DATAEXPORT to excel
2 in excel create the multiple commands to copy and paste to AutoCAD for insert the blocks (ATTACHED file)
3 copy all commands to the file and AutoCAD should insert the blocks.
This 3 steps is the unique way that I found to solve all my problems related to the posted bugs. brute froce, but works. the problems is that is very painful to do it everything. so that is the reason to request for help in all forums because I think might help to everyone (specially to me).
---
and where are here, my last hope are you MP, save us of this pain.