Author Topic: SS-GETBOUNDINGBOX doesn't work well!  (Read 2254 times)

0 Members and 1 Guest are viewing this topic.

cjw

  • Guest
SS-GETBOUNDINGBOX doesn't work well!
« on: February 26, 2009, 01:27:18 AM »
The code is simply.
Code: [Select]
(defun CJW-SS-GETBOUNDINGBOX (SS / BMAX BMIN E I PTLIST)
  (vl-load-com)
  (repeat (setq I (sslength SS))
    (setq E (ssname SS (setq I (1- I))))
    (vla-getboundingbox
      (vlax-ename->vla-object E)
      'BMIN
      'BMAX
    )
    (setq BMIN (vlax-safearray->list BMIN)
  BMAX (vlax-safearray->list BMAX)
    )
    (setq PTLIST (cons BMAX PTLIST))
    (setq PTLIST (cons BMIN PTLIST))
  )
  (list
    (apply 'mapcar (cons 'min PTLIST))
    (apply 'mapcar (cons 'max PTLIST))
  )
)

;;;(setq 2PTLIST (CAI-SS-GETBOUNDINGBOX (ssget)))
;;;(command "._rectang" "_none" (car 2PTLIST) "_none" (cadr 2PTLIST))



How to make the oblique rectang? see the picture below:


CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SS-GETBOUNDINGBOX doesn't work well!
« Reply #1 on: February 26, 2009, 08:41:45 AM »
If it's text you are after try this:
Code: [Select]
;;  Align a group of text or mtext objects along there X or Y axis
;;  User picks Master text & then text to align under it
;;  Does not change the text alignment or justification or combine text
;;  Uses the justification of the Master text to set alignment
;;  This routine simply moves & rotates the text
;;  Will allow Master text on any angle

http://www.theswamp.org/index.php?topic=25824.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SS-GETBOUNDINGBOX doesn't work well!
« Reply #2 on: February 26, 2009, 08:44:39 AM »
Here is another one:

Quote
My Text Box Routine is ready for prime time.
It will create the boxes shown in the picture.
It supports mtext and dtext, rotated or not & UCS other that world.
It supports groups of dtext or mtext.
http://www.theswamp.org/index.php?topic=7003.0
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

cjw

  • Guest
Re: SS-GETBOUNDINGBOX doesn't work well!
« Reply #3 on: February 26, 2009, 09:44:56 AM »
CAB,Thank you! :-)
you always know the answer...
Thank you very much!!!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: SS-GETBOUNDINGBOX doesn't work well!
« Reply #4 on: February 26, 2009, 09:59:37 AM »
You're welcome.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.