Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/16/2025 in Posts

  1. Written from my smartphone. I haven't tried it but it should work. (defun hatcharea (/ ss area i eo pt lst layer lstLayers) (setq ss (ssget '((0 . "hatch"))) area 0 i 0 ) (cond ((and (and ss) (> (sslength ss) 0)) (repeat (sslength ss) (setq eo (vlax-ename->vla-object (ssname ss i))) (setq area (vlax-get eo 'Area) layer (vlax-get-property eo "LAYER") ) (if (setq lst (assoc layer lstLayers)) (setq lstLayers (subst (list layer (+ (cadr lst) area)) lst lstLayers)) (setq lstLayers (append lstLayers (list (list layer area)))) ) (setq i (+ i 1)) ) (foreach layer lstLayers (if (setq pt (getpoint (strcat "\nInsertion point for area HATCHs in layer \'" (strcase (car layer)) "\'"))) (progn (setq area (cadr layer)) (command "color" "bylayer") (command "STYLE" "Standard" "" 2 "" "" "" "") (command "text" pt 0 (strcat "Area = " (rtos area 2 2)) "") (command "STYLE" "Standard" "" 0.2 "" "" "" "") ) ) ) ) ) (princ) )
    1 point
  2. A similar program you can have circles or squares each addition adds 1 including A B C etc. Pt num bubble.lsp
    1 point
×
×
  • Create New...