AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

zoom to object

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
310 Views, 0 Replies

zoom to object

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

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


AutoCAD Beta