Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/21/2022 in all areas

  1. (defun c:Test ( / lyn) (vlax-for obj (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object))) (or (wcmatch (setq lyn (vla-get-name obj)) "*|*") (and (wcmatch lyn "AN_*,WS_*") (vla-put-Description obj (if (wcmatch lyn "AN_*") "Annotation" "Wall Structure")) ) ) ) (princ) ) (vl-load-com)
    3 points
  2. That's to pass over external references' layers. Why are you asking for something and you are doing something else ? Anyway, just build the list as I did in the following program to make it working professionally. (defun c:Test ( / lst lyn ) (setq lst '(("AN_" "Annotation Layer - ") ("CH_" "Colour Hatch Layer - ") ) ) (vlax-for obj (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object))) (or (wcmatch (setq lyn (vla-get-name obj)) "*|*") (and (setq fnd (assoc (substr lyn 1 3) lst)) (vla-put-Description obj (strcat (cadr fnd) lyn)) ) ) ) (princ) ) (vl-load-com)
    2 points
  3. To check just GROUP them with GROUPDISPLAYMODE set at 1 or 2 (initial Value) the grip displayed would be the geometric center of the grouped objects.
    1 point
  4. Steven P draw a pline as a "U" rotated and compare the methods suggested. You could average points also but it may not be geom centre.
    1 point
  5. I use a lisp to plot and use window not layout option, unless something screwy by user works every time.
    1 point
  6. Going to have to agree with the others. Why learn paper 2D drafting techniques for a modern CAD system?
    1 point
  7. Thank goodness AutoDesk did not design AutoCAD such that we could work smarter rather than harder. Were the pages of instructions you posted not clear enough?
    1 point
  8. Thanks for the encouragement . So comments are welcome anytime . (defun c:Lentxt (/ ss) (if (setq ss (ssget "_:L" '((0 . "LINE")))) ( (lambda (i / ss1 e dis pt1 pt2 pt3) (while (setq ss1 (ssname ss (setq i (1+ i)))) (setq e (entget ss1 )) (setq dis (distance (setq pt1 (cdr (assoc 10 e)))(setq pt2 (cdr (assoc 11 e))))) (cond ((< (car pt1)(car pt2)) (setq pt3 (polar pt1 (setq ang (angle pt1 pt2)) (/ dis 2.))) ) ((> (car pt1)(car pt2))(setq pt3 (polar pt2 (setq ang (angle pt2 pt1)) (/ dis 2.))) ) ) (entmakex (list (cons 0 "TEXT") (cons 10 (polar pt3 ang 0)) (cons 1 (rtos dis 2)) (cons 50 ang) (cons 40 (getvar 'textsize)))) ) ) -1 ) (princ "\n No Line(s) selected") ) (princ) ) Thanks. Tharwat
    1 point
  9. I am not satisfied with the answer. I asked the 2D drawing method of a spring such as attached pics at post #1, not converting 3D to 2D. Anybody else can teach me?
    -1 points
×
×
  • Create New...