Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/08/2023 in all areas

  1. Give this a try. If your offset distance is smaller than your block spacing it will not complete the union. (defun c:foo (/ d l ll p1 p2 pl pl2 r s sp ur) ;; RJP » 2023-06-08 (cond ((and (setq d (getdist "\nSpecify offset distance: ")) (setq s (ssget '((0 . "INSERT") (2 . "RECTANGLE_ROUNDED_706")))) (setq sp (vlax-ename->vla-object (cdr (assoc 330 (entget (ssname s 0)))))) ) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (vla-getboundingbox (vlax-ename->vla-object e) 'll 'ur) (mapcar 'set '(p1 p2) (mapcar 'vlax-safearray->list (list ll ur))) (setq l (list (car p1) (cadr p1) (car p2) (cadr p1) (car p2) (cadr p2) (car p1) (cadr p2))) (setq pl (vlax-invoke sp 'addlightweightpolyline l)) (vlax-put pl 'closed -1) (setq r (cons (car (vlax-invoke sp 'addregion (setq pl2 (vlax-invoke pl 'offset d)))) r)) (mapcar 'vla-delete (list pl (car pl2))) ) ) ) (setq pl (car r)) (while (setq r (cdr r)) (vla-boolean pl acunion (car r))) (princ) ) (vl-load-com)
    1 point
  2. the price seems a bit high...so no deal. Not good for me
    1 point
  3. @Steven P, @Tharwat, @BIGAL ITS ALIVE It IS possible to launch a commando with a reactor. It was a long day... but i got it working! ;;--------------------------------------------;; ;;--------------------------------------------;; (if (not FIX:DIM) (setq FIX:DIM (vlr-command-reactor nil '((:vlr-commandended . DIM:RESTORE)(:vlr-commandcancelled . DIM:RESTORE)))) ) ;;--------------------------------------------;; ;;--------------------------------------------;; (defun DIM:RESTORE (rea lst) (if (vl-position (car lst)'("DIMLINEAR" "DIMALIGNED")) (progn (vla-sendcommand (vlr-document rea)(strcat "(FIX:DIMENSIONSTYLES) "))(princ) ) ) ) ;;--------------------------------------------;; ;;--------------------------------------------;; (defun FIX:DIMENSIONSTYLES ( / oldcmdecho ) (setq oldcmdecho (getvar "CMDECHO")) (setvar "CMDECHO" 0) (while (setq dimstyle (tblnext "dimstyle" (not dimstyle))) (setq dimstylename (cdr (assoc 2 dimstyle))) (command "-DIMSTYLE" "restore" dimstylename) (setvar "DIMTMOVE" 1) (setvar "DIMTFILL" 1) (command "-DIMSTYLE" "save" dimstylename "Y") ) (setvar "CMDECHO" oldcmdecho) (princ) ) ;;--------------------------------------------;; ;;--------------------------------------------;; (princ) ;;--------------------------------------------;; ;;--------------------------------------------;;
    1 point
  4. Ah, go on, if you are quoting Lee Mac, I'll see your nested burst and raise you Copy Swap Text (CTX), (http://lee-mac.com/copytext.html) RTN from this function (defun copyswaptext:getselection ( msg ini / rtn sel str tmp ) returns the selected entity name and the text value - what the inputs are can be found in the rest of the code. CTX is one of my favourite functions, tried making up similar but it was never quite as good as his - well worth having in your LISP library
    1 point
  5. I updated the code above so ATTSYNC will only be called once per block name.
    1 point
  6. You can contact them via https://civilsitedesign.com.au pretty sure there is a Contact us, ask about your question there.
    1 point
×
×
  • Create New...