Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello folks,
I'm just getting started with AutoLISP / Active X, and I cannot figure out why this isn't working. The bottom left corner of the rectangle drew with offset when I was testing with just mno, but when I replicated it with mxo, the code stops working. The bulk of this code is borrowed, leaving honorable mention in the comments.
;;Foamstamp.lsp
;;Bounding code borrowed from BlackBox on CadTutor
(defun c:FoamStamp (/ eName mn mx mno mxo)
(vl-load-com)
(if (setq eName (car (entsel "\n >> Select Object >> ")))
(progn
(vla-getboundingbox (vlax-ename->vla-object eName) 'mn 'mx)
(vl-cmdf "._rectang" (
(setq mno (mapcar (lambda (a)(- a 0.25))(vlax-safearray->list mn)))
(setq mxo (mapcar (lambda (b)(+ b 0.25))(vlax-safearray->list mx)))
)
)
(princ)
)
)
)
Solved! Go to Solution.