Jump to content

Leaderboard

Popular Content

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

  1. If what your cutting is rectangular shaped you cant go wrong with this website. https://www.cutlistoptimizer.com/
    1 point
  2. A undocumented method that may help is set path to say G:\TE-templates.. note the double period .. this tells Autocad to search below this level.
    1 point
  3. This might help. ;;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;;; + box_mtext + ;;; + Created by C. Alan Butler + ;;; + Copyright 2005 + ;;; + by Precision Drafting & Design All Rights Reserved. + ;;; + Contact at ab2draft@TampaBay.rr.com + ;;; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;;; ;;; VERSION ;;; 1.2 Jan 24, 2006 UCS corrections ;;; ;;; FUNCTION ;;; Return Box coordinates for an Mtext object in any UCS, any angle. ;;; ;;; USAGE ;;; (box_mtext ent) ;;; ;;; ARGUMENTS ;;; ent = mtext ename ;;; ;;; RETURNS ;;; list of 4 points for box, (ll lr ur ul) ;;; ;;; PLATFORMS ;;; 2000+ Tested in 2000 only (defun box_mtext (ent / elst p10 txth ang vec wid hgt dxf UCSangle attpt ul ur lr ll) (defun dxf (code elst) (cdr (assoc code elst)) ) ;; incase it is a list, (ename point) (and (listp ent) (setq ent (car ent))) (setq elst (entget ent)) (setq p10 (trans (dxf 10 elst) 0 1) ; insertion point WCS to UCS txth (dxf 40 elst) ; text height wid (dxf 42 elst) ; full width hgt (dxf 43 elst) ; full height ang (dxf 50 elst) ; rotation angle in UCS attpt (dxf 71 elst) ; attachment point code ) ;|-------------------------------------------------------------- ;; CAB 01/24/2006 removed as the ang fron DXF code 50 os in UCS ;; correct for UCS (setq ang (- ang (angle (trans '(0.0 0.0 0.0) 1 0) (trans '(1.0 0.0 0.0) 1 0))) ) ;; angles 90 = (/ pi 2) 180 = pi 270 = (* pi 1.5) ---------------------------------------------------------------|; ;; Get upper left (ul) from insert point (p10) (cond ((= attpt 1) (setq ul p10)) ; top left ((= attpt 2) (setq ul (polar p10 (+ pi ang) (/ wid 2)))) ; top center ((= attpt 3) (setq ul(polar p10 (+ pi ang) wid))) ; top right ((= attpt 4) (setq ul (polar p10 (+ (/ pi 2) ang) (/ hgt 2)))) ; middle left ((= attpt 5) ; middle center (setq ul (polar (polar p10 (+ pi ang) (/ wid 2)) (+ (/ pi 2) ang) (+ (/ hgt 2))))) ((= attpt 6) ; middle right (setq ul (polar (polar p10 (+ pi ang) wid) (+ (/ pi 2) ang) (+ (/ hgt 2))))) ((= attpt 7) (setq ul (polar p10 (+(/ pi 2) ang) hgt))) ; bottom left ((= attpt ; bottom center (setq ul (polar (polar p10 (+ pi ang) (/ wid 2)) (+ (/ pi 2) ang) hgt))) ((= attpt 9) ; bottom right (setq ul (polar (polar p10 (+ pi ang) wid) (+ (/ pi 2) ang) hgt))) );cond (setq ur (polar ul ang wid) lr (polar ur (+ ang (* pi 1.5)) hgt) ll (polar lr (+ ang pi) wid) );setq (list ll lr ur ul) );boxmtext
    1 point
  4. Quick and dirty: (defun c:txt2tag (/ oldcmd ss) (setq oldcmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (if (setq ss (ssget (list (cons 0 "TEXT") (if (getvar "CTAB")(cons 410 (getvar "CTAB")) (cons 67 (- 1 (getvar "TILEMODE"))))))) (progn (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (command "-attdef" "" (cdr (assoc 1 (entget e))) "" "" (cdr (assoc 10 (entget e))) "") (entdel e))) (princ "\n<!> No Text Selected <!>")) (setvar "CMDECHO" oldcmd) (princ))
    1 point
×
×
  • Create New...