link selected block to nearest selected object in one determinated range

link selected block to nearest selected object in one determinated range

jtm2020hyo
Collaborator Collaborator
635 Views
1 Reply
Message 1 of 2

link selected block to nearest selected object in one determinated range

jtm2020hyo
Collaborator
Collaborator

attached base lisp

attached dwg sample.


I have an attached lisp to link selected blocks to the nearest point of any selected objects...

 

imagen.png


works perfect, but now I need to limit the range angular. for example, divide the 360 degrees into quadrants

 

imagen.png


... quadrants (diagonal and "in cross" ) but per each block selected individually.

so the result should be something like this:

 

imagen.png


so this should be the result if you add the option for "quadrants in (D)iagonals" then choose the number "2", something like this:

 

imagen.png


and for "in (C)ross" quadrant "(2)"

 

imagen.pngimagen.png

 


then, if the block was rotated 180 degrees, then the quadrants should be rotated 180 degrees too.

 

0 Likes
636 Views
1 Reply
Reply (1)
Message 2 of 2

jtm2020hyo
Collaborator
Collaborator

PD: if possible just add one determined angle, for example, drawing a line 90 degrees (variable) respect to the block rotation ( if the block have rotation 41, then the line is drawing in 131 degrees respect to the selected block base point), then link the selected object until touch him, if not possible because the line does not touch the selected object, then do nothing.

 

PD2: all lines should start since the block base point.

 

 

0 Likes