Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to know if an block Mirror has been realized?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
andresep82
728 Views, 5 Replies

Is it possible to know if an block Mirror has been realized?

is it possible? i need because i get the base point and I start drawing from him.

 

 

thanks¡¡¡

5 REPLIES 5
Message 2 of 6
_Tharwat
in reply to: andresep82

Your purpose is that clear or at least to me .
More details or explanations needed .
Message 3 of 6
dicra
in reply to: andresep82

I'm not so sure, but I think that, if any of group codes  41 42 43 is negative, than block was mirrored.

One thing which is confusing to me is that, if block was mirrored two times, than group code is going to be positive again.

 

Maybe you can try something like this:

 

(setq xscale (cdr (assoc 41 block)))
(setq yscale (cdr (assoc 42 block)))
(setq zscale (cdr (assoc 43 block)))

(minusp (min xscale yscale zscale))

 Hope this will help you...

Message 4 of 6
andresep82
in reply to: _Tharwat

ok....i try to  explain....

 

when you  insert a block and  you do a mirror to him his base point change.....

 

example

 

and when i do....

 

pt1 (cdr (assoc 10 (entget bloque) ))

 

(setq    pt2 (polar pt1 (/ (* giro pi) 180.0)  (+ parametro1 0.10))

 

 

if block has a mirror pt2 draw in correct direction....

 

Message 5 of 6
andresep82
in reply to: andresep82

yeah¡¡¡¡¡    tharwat 

 

 

(setq xscale (cdr (assoc 41 block)))

 

 

if is possitive do not have mirror, if is negative have a mirror and if you do 2 mirror is possitive, 3 mirror negative.....

 

thanks¡¡¡¡¡¡¡

Message 6 of 6
Kent1Cooper
in reply to: dicra


@dicra wrote:

... if any of group codes  41 42 43 is negative, than block was mirrored.

... if block was mirrored two times, than group code is going to be positive again.

.... 

(setq xscale (cdr (assoc 41 block)))
(setq yscale (cdr (assoc 42 block)))
(setq zscale (cdr (assoc 43 block)))

(minusp (min xscale yscale zscale))

....


You can account for the possibility of two negative scale factors meaning the Block is not mirrored, by changing one function:
 

(minusp (* xscale yscale zscale))

Kent Cooper, AIA

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

Post to forums  

Autodesk Design & Make Report

”Boost