Hey Coder...
I had the same Problem short time ago...
I solved it so I wanna share
(defun BCS2WCS (BlockRef pointlist / ent inspkt ang)
(setq ent (entget BlockRef))
(setq inspkt (cdr (assoc 10 ent)))
(setq ang (cdr (assoc 50 ent)))
(mapcar
'(lambda (Pt /)
(trans
(mapcar
'+
(polar
'(0 0 0)
(+ ang (angle '(0 0 0) Pt))
(distance '(0 0 0) Pt)
)
inspkt
)
BlockRef
0
)
)
pointlist
)
)
(defun WCS2BCS (BlockRef pointlist / ent inspkt ang)
(setq ent (entget BlockRef))
(setq inspkt (cdr (assoc 10 ent)))
(setq ang (cdr (assoc 50 ent)))
(mapcar
'(lambda (Pt /)
(apply
'(lambda (x y z / )
(list
(+ (* x (cos ang)) (* y (sin ang)))
(- (* x (sin ang)) (* y (cos ang)))
z
)
)
(mapcar
'-
(trans
Pt
0
BlockRef
'T
)
InsPkt
)
)
)
pointlist
)
)
I named the function with BCS... BlockCoordinateSystem
maybe, if u need it, u have to add a multiplication with the scale...
Hope it helps
greets
reltro