Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/25/2025 in all areas

  1. To account for such a case, you can append the first vertex to the DXF data list, e.g.: (defun c:mydimalign ( / e p x ) (if (and (setq e (car (entsel))) (= "LWPOLYLINE" (cdr (assoc 0 (setq x (entget e))))) ) (foreach g (if (= 1 (logand 1 (cdr (assoc 70 x)))) (append x (list (assoc 10 x))) x) (cond ( (/= 10 (car g))) ( p (command "_.dimaligned" p (setq p (cdr g)) "@5<180")) ( (setq p (cdr g))) ) ) ) (princ) )
    1 point
  2. EXCEPT, if there are more objects in the drawing, of course.
    1 point
  3. (defun c:crViewportFromPL ( / pts minPt maxPt width height lst) (setq pline (car (entsel "\nSelect a polyline: "))) (if (and pline (= (cdr (assoc 0 (entget pline))) "LWPOLYLINE")) (progn (setq pts (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget pline)))) (setq minPt (list (apply 'min (mapcar 'car pts)) (apply 'min (mapcar 'cadr pts)))) (setq maxPt (list (apply 'max (mapcar 'car pts)) (apply 'max (mapcar 'cadr pts)))) (setq width (- (car maxPt) (car minPt))) ) (setq height (- (cadr maxPt) (cadr minPt))) ) (if (setq lst (layoutlist)) (progn (setvar 'CTAB (car lst)) (vl-cmdf "_zoom" "_w" minPt maxPt) ) ) ;;; (command "_.-VPORTS" "_M" "1" "1" "0" "0" width height) )
    1 point
  4. Maybe use (setq pline (car (entsel "\nPick pline "))) (setq pts (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget pline))))) (command "Mview" (car pts)(caddr pts)) (command "Mspace") (command "Zoom" "E")
    1 point
  5. Maybe this will help you (defun c:trocapa (/ conj ent n) (setq n -1) (princ "\nSelect TEXTs/MTEXTs...") (if (setq conj (ssget '((0 . "*TEXT")))) (while (setq ent (ssname conj (setq n (1+ n)))) (entmod (append (entget ent) (list (cons 8 "MyLayer") (cons 62 256)))) ) ) (princ) )
    1 point
  6. https://www.lee-mac.com/unformatstring.html
    1 point
  7. I made a 100 on the civil drafting assignment so i hope this helps others
    1 point
  8. My mail box thinks you're spam , well punk are you? (with the voice of Clint Eastwood ) Oh I thought you wanted all ents inside block updated... silly me... good news is nos problemos, the bad news is , dragons never know when to stop and just have to go over the top so its gonna take more time before I'm satisfied (not the youngest dragon on the block anymore ya know)
    1 point
×
×
  • Create New...