Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/24/2025 in all areas

  1. How are you creating the polyline? You can use -Hatch with the "draW boundary" option, just a few clicks for a solid hatch on current layer.
    1 point
  2. My contribution, you can try it: (prompt "\nTo run a LISP type: CPBLK") (princ) (defun c:CPBLK ( / old_osmode old_attdia ent ptlist spt ept delta num_offset npt ss len i val data block_name data tag_value num ct) (setq old_osmode (getvar 'osmode)) (setq old_attdia (getvar 'attdia)) (setvar 'attdia 0) (setq ent (car (entsel "\nPick the LINE:\n")) ptlist (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget ent))) spt (vlax-curve-getStartPoint (vlax-ename->vla-object ent)) ept (vlax-curve-getEndPoint (vlax-ename->vla-object ent)) delta (- (car ept) (car spt)) num_offset (/ delta (length ptlist)) npt (getpoint "\Pick insertation point for new LINE:") ) (setvar 'osmode 0) (command-s "_LINE" npt (strcat "@" (rtos delta) "<" (itoa 0)) "") (setq ss (ssget "_F" ptlist (list (cons 0 "INSERT"))) len (sslength ss) i 0 val (list) ) (while (< i len) (setq data (entget (ssname ss i)) block_name (cdr (assoc 2 data)) ) (while (/= (cdr (assoc 0 data)) "SEQEND") (setq data (entget (entnext (cdr (assoc -1 data)))) tag_value (cdr (assoc 1 data)) val (append val (list (list tag_value block_name))) ) ) (setq i (1+ i)) ) (setq val (vl-remove-if-not '(lambda (x) (/= (car x) nil)) val) num 0 ct 0 ) (repeat (length val) (command-s "-insert" block_name (list (+ (car npt) num) (cadr npt)) 1 0 (car (nth ct val))) (setq num (+ num num_offset) ct (1+ ct) ) ) (setvar 'osmode old_osmode) (setvar 'attdia old_attdia) (prompt (strcat "\nCopied " (itoa (length val)) " blocks along path.")) (princ) ) and it looks like on the .mp4: Recording2025-07-24at08.56.33-ezgif.com-gif-to-mp4-converter.mp4
    1 point
  3. You don't draw a line read the questions asked, pick the pline, pick the block, pick a point to draw the line & blocks and enter a gap distance between them say 1000. The line with copied blocks is automatically drawn. The line will be as long as there is blocks.
    1 point
  4. Here is the help for Extend it has some variables you can set may be applicable for Acad. https://help.bricsys.com/en-us/document/command-reference/e/extend-command?version=V25&id=165079077042
    1 point
  5. @SLW210 it ask for the polyline where the blocks are inserted, then get the coordinates from such polyline , and use it to get all blocks as selectionset . It draw a polyline straight long enough to receive the new block at a given distance, 1000 units in this cas Then it copy each one and move to the new line
    1 point
  6. Like SLW, I have my preferred settings in a LISP - runs at startup - but if I am playing about with things I can reset then to what I like.
    1 point
  7. I use the acaddoc.lsp to set my Sysvars. ;(SETVAR "" n) (SETVAR "FILEDIA" 1) (SETVAR "FILLMODE" 1) (SETVAR "FRAME" 2) System variables are not saved in AutoCAD I just went through the SYSVDLG, then made the settings as I had them. Not sure how up to date this list is... List of System Variables - AutoCAD Tutorial and Videos
    1 point
×
×
  • Create New...