Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/20/2025 in all areas

  1. It's really hard to consider all possible situations in code. I spent a while working on it yesterday afternoon, but I didn't have time to finish. I enjoyed doing it because it's helping me remember some things I'd forgotten. I'll post the result as soon as I can.
    1 point
  2. Now I see what you did here, you should have to select all the polylines. I've restructured the routine to notify user to select the largest polyline. (defun c:pl_area (/ bb e eng h ll lst lst2 pt pts n nv ss sst str ur v raycast) ;;LeeMac (defun raycast ( p l ) (= 1 (logand 1 (length (vl-remove 'nil (mapcar '(lambda ( a b ) (inters p (mapcar '+ p '(1e8 0.0)) a b)) (cons (last l) l) l ) ) ) ) ) ) (if (setq e (car (entsel "\nSelect largest polyline: "))) (progn (setq eng (entget e) bb (mapcar '(lambda (x)(trans (cdr x) e 1))(vl-remove-if-not '(lambda (x)(eq (car x) 10)) eng)) ss (ssget "wp" bb '((0 . "LWPOLYLINE"))) sst (ssget "cp" bb '((0 . "MTEXT,TEXT"))) ) (cond ((null ss)(setq ss (ssadd))(ssadd e ss)) ((not (ssmemb e ss))(ssadd e ss)) ) (if (eq (sslength ss)(sslength sst)) (progn (repeat (setq n (sslength ss)) (setq n (1- n) e (ssname ss n) v (vlax-ename->vla-object e) a (vla-get-area v) lst (cons (cons a e) lst) ) ) (setq lst (vl-sort lst '(lambda (x y) (< (car x) (car y))))) (repeat (setq n (sslength sst)) (setq n (1- n) e (ssname sst n) v (vlax-ename->vla-object e) lst2 (cons (cons v (vlax-get v 'insertionpoint)) lst2) ) ) (foreach a lst (setq eng (entget (cdr a)) pts (mapcar 'cdr (vl-remove-if-not '(lambda (x) (eq (car x) 10)) eng)) str (rtos (car a) 2 4) ) (foreach pt lst2 (if (raycast (cdr pt) pts) (progn (if (eq (vla-get-objectname (car pt)) "AcDbMText") (vlax-put (car pt) 'textstring (strcat (vlax-get (car pt) 'textstring) "\\P= " str) ) (progn (setq nv (vla-copy (car pt)) h (* 1.3333 (vla-get-height nv))) (vlax-put nv 'textstring str) (vlax-put nv 'insertionpoint (list (car (cdr pt)) (- (cadr (cdr pt)) h) (caddr (cdr pt)))) ) ) (setq lst2 (vl-remove pt lst2)) ) ) ) ) ) (prompt "\nPolyline and text counts do not match. Check selection.") ) ) ) (princ) )
    1 point
  3. Its no good even if you could convert the TTF to a shx you would still have to send it to all 50 people, so the TTF is a custom font ? Not a standard one within Windows which has lots. You can copy a font and paste to c:\windows\fonts it should auto install. Like @Steven P why not just replace with some thing very close. If you open explorer and go to c:\windows\fonts you will see what the font looks like or you can dbl click it, and it will show an example of the font in words. If you have dual screens will help to compare. There is one TTF I know of which is Arch.TTF which s a freehand font and used a lot.
    1 point
×
×
  • Create New...