Community
Hello members of the forum.
My question: Selection set "C" works when using zoom to objects (in contrast to using selection set "X").
Why doesn't it work when I run the code? (command "_.zoom" "C" ins 10).
However , when I added "alert" to the command, everything works fine.
(defun C:BR (); = Break Objects At Blocks [Line, Polyline, Arc, Xline, Ray, open Ellipse or Spline] (vl-load-com) (command "_.zoom" "extents") (setq osmode (getvar "osmode")) (setq cmdecho (getvar "cmdecho")) (setvar "osmode" 0) (setvar "cmdecho" 0) (if (setq blkss (ssget "X" '((0 . "INSERT")))) (progn (repeat (setq n (sslength blkss)) (setq ins (cdr (assoc 10 (entget (ssname blkss (setq n (1- n))))))) ;;; (alert " zoom C") (command "_.zoom" "C" ins 10) (if (and (setq entss (ssget "_C" ins ins '((0 . "*LINE,*POLYLINE,ARC,ELLIPSE,RAY")))) (setq ent (ssname entss 0) etype (cdr (assoc 0 (entget ent))) ); setq (/= etype "MLINE"); [can't be broken] (if (wcmatch etype "SPLINE,ELLIPSE") (not (vlax-curve-isClosed ent)) T); no single-point Break ); and (command "_.break" ent ins ins) ); if ); repeat );; progn ); if );; defun
Thanks
Hello members of the forum.
My question: Selection set "C" works when using zoom to objects (in contrast to using selection set "X").
Why doesn't it work when I run the code? (command "_.zoom" "C" ins 10).
However , when I added "alert" to the command, everything works fine.
(defun C:BR (); = Break Objects At Blocks [Line, Polyline, Arc, Xline, Ray, open Ellipse or Spline] (vl-load-com) (command "_.zoom" "extents") (setq osmode (getvar "osmode")) (setq cmdecho (getvar "cmdecho")) (setvar "osmode" 0) (setvar "cmdecho" 0) (if (setq blkss (ssget "X" '((0 . "INSERT")))) (progn (repeat (setq n (sslength blkss)) (setq ins (cdr (assoc 10 (entget (ssname blkss (setq n (1- n))))))) ;;; (alert " zoom C") (command "_.zoom" "C" ins 10) (if (and (setq entss (ssget "_C" ins ins '((0 . "*LINE,*POLYLINE,ARC,ELLIPSE,RAY")))) (setq ent (ssname entss 0) etype (cdr (assoc 0 (entget ent))) ); setq (/= etype "MLINE"); [can't be broken] (if (wcmatch etype "SPLINE,ELLIPSE") (not (vlax-curve-isClosed ent)) T); no single-point Break ); and (command "_.break" ent ins ins) ); if ); repeat );; progn ); if );; defun
Thanks
Can't find what you're looking for? Ask the community or share your knowledge.