Lisp to multi mirror with several base point.

Lisp to multi mirror with several base point.

Anonymous
Not applicable
1,547 Views
4 Replies
Message 1 of 5

Lisp to multi mirror with several base point.

Anonymous
Not applicable

Hi,

I hope any one can help to me.

 

I am trouble to using mirror commend to use with every object. I need to change multi mirror with several base point.

 

Thanks in advance.

Sujinkutti...

 

 

0 Likes
1,548 Views
4 Replies
Replies (4)
Message 2 of 5

ВeekeeCZ
Consultant
Consultant

Post some sample dwg with several objects and draw their mirror lines you want to use for the MIRROR command.

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi,

 

Please refer the below snap.. i have to mirror all block different location, I need like blue box below snap..

 

 Image.png

Thanks and regards,

Sujikutti.

0 Likes
Message 4 of 5

ВeekeeCZ
Consultant
Consultant

 

(defun c:MirrorHor (/ ss i en pt)

  (if (setq ss (ssget "_:L" '((0 . "INSERT"))))
    (repeat (setq i (sslength ss))
      (setq en (ssname ss (setq i (1- i)))
            pt (cdr (assoc 10 (entget en))))
      (command "_.MIRROR" en "" "_non" (trans pt 0 1) "_non" "@0,1" "_Yes")))
  (princ)
)
Message 5 of 5

dbhunia
Advisor
Advisor

Hi,

 

As you asked....

 


@Anonymous wrote:

Hi,

 

Please refer the below snap.. i have to mirror all block different location, I need like blue box below snap..

 ............


 

I think you have to mirror all the Blocks without selection .......... If I am right then try this.......

 

(defun C:MB (/ blk sset N ent pt)
(command "_.CMDECHO" 0)
(setq blk (getstring "\nEnter the name of the Blok to Mirror: "))
(setq sset (ssget "_A" (List '(0 . "INSERT") (cons 2 blk))))
      (repeat (setq N (sslength sset))
      	      (setq ent (ssname sset (setq N (- N 1))))
              (setq pt (cdr (assoc 10 (entget ent))))
              (command "_.MIRROR" ent "" "_non" (trans pt 0 1) "_non" "@0,1" "_Yes")
      )
(command "_.CMDECHO" 1)
(princ)
)

Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....
0 Likes