Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/20/2024 in all areas

  1. Thanks Steven, neat idea. I've got this one sorted with the help of Lee Macs code.
    1 point
  2. Not sure if this is any help, I use these to justify text (single command, example JUBC - JUstify Bottom Centre). Should also work with a single entity rather than a selection set. (defun c:jul() (jut "l")) (defun c:juc() (jut "c")) (defun c:jur() (jut "r")) (defun c:jutl() (jut "tl")) (defun c:jutc() (jut "tc")) (defun c:jutr() (jut "tr")) (defun c:juml() (jut "ml")) (defun c:jumc() (jut "mc")) (defun c:jumr() (jut "mr")) (defun c:jubl() (jut "bl")) (defun c:jubc() (jut "bc")) (defun c:jubr() (jut "br")) ;;https://www.cadtutor.net/forum/topic/35569-text-justification-lisp/ (defun jut (just / ss) (princ (strcat "\nSelect Text")) (if (setq ss (ssget "_:L" '((0 . "ATTDEF,MTEXT,TEXT")))) (command "_.justifytext" ss "" just) ) (princ) )
    1 point
  3. This? (setq obj (vlax-ename->vla-object (setq en (car (entsel))))) (setq ent (entget en)) (cond ;; If it's TEXT ((eq (cdr (assoc 0 ent)) "TEXT") (princ "\nIS TEXT\n") (setq pos (vla-get-InsertionPoint obj)) (vla-put-Alignment obj 13) (vla-put-TextAlignmentPoint obj pos) ) ;; If it's MTEXT ((eq (cdr (assoc 0 ent)) "MTEXT") (princ "\nIS MTEXT\n") (vla-put-AttachmentPoint obj acAttachmentPointBottomCenter) ) )
    1 point
  4. @marko_ribar has given you a good answer using (setvar 'osmode x) you can reset the osnap in your code as required, you can also set combo's like end,center 5. (setvar 'osmode 1) (setq pt (getpoint "\nPick ")) (setvar 'osmode 4) (setq cen (getpoint "\nPick circle "))
    1 point
×
×
  • Create New...