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

Is there a way to have an end of a line follow another object if moved?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
401 Views, 4 Replies

Is there a way to have an end of a line follow another object if moved?

An example of what I would like to do is say I have a lisp that prompts me to draw a line and then at the 2nd point I pick, it inserts a block at the end of that line. Is there a way to have the line linked to the block where as if I were to move the block after the lisp is done that one end of the line that is closest to that block would follow the block and stay centered with that block even though the block and the line don't neccessarily have to touch. Also the opposite end of the line stays at the first point where it was placed so basically only the 2nd end of the line follows the block and stays centered pointing towards the middle of the block.

Thanks in advance.
4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: Anonymous

I'm not sure whether that could be done with a reactor [I don't have experience with that]. But that particular thing can certainly be done without any code, by using Stretch instead of Move, if the Crossing window selection includes both the Block insertion point and the desired end [and not the other end] of the Line.

--
Kent Cooper


Hoze wrote...
....to draw a line and then at the 2nd point I pick, it inserts a block at the end of that line. Is there a way to have the line linked to the block where as if I were to move the block ... that one end of the line that is closest to that block would follow the block....
Kent Cooper, AIA
Message 3 of 5
Anonymous
in reply to: Anonymous

The stretch doesn't work but even if I just click on the block itself and move it, the end line does move with it, but it stays to the left side when making the line left to right and the block is placed on the right side of the line. So even if I pick up the block and move it to the left side of the entire line, the right edge of the rotates with the block but stays connected to the left side of the block but is not centered and then also goes through the block to meet that left side, which I do not want it to do. I want it to keep its distance when the block is moved and stay centered (or pointing toward the middle of the block, whereever it may be moved to after the lisp is over).

I do know that if the line ends in the middle of the block to begin with, then it does what I want and the line rotates AND stays centered to the block... but I can't have the line and block overlap. Any ideas? Oh, I'm actually using a quick leader where I'm referring to as a "line" if that helps. I'm just basically placing custom blocks at the end of the leader. Hope that helps.
Message 4 of 5
Kent1Cooper
in reply to: Anonymous

Well .... Start over.

A Leader is a completely different thing from a Line, mostly because it can be linked to the annotation or block or whatever was placed in association with it. That's why its end follows, and maintains its original positional relationship, when you move the Block [that's exactly what it's supposed to do]. But if you expect it to know when its line element(s) is/are crossing the Block if you move that a particular direction or distance, and somehow change to connect to the other side [or the top or bottom, perhaps?] of the Block, I think you may be out of luck. Maybe a before-and-after image would shed more light -- it's possible that it could be done through some very sophisticated reactor that would look at the bounding box of the Block relative to the various points on the Leader, but it would certainly have a whole passel of possibilities to take into account.

In what way does Stretching not work? Is it merely that it does the same thing that moving the Block does?

--
Kent Cooper
Kent Cooper, AIA
Message 5 of 5
Anonymous
in reply to: Anonymous

Yes, Stretching it just keeps the end of the line to the same side of the block when stretched and moved so it doesn't work either. It does the same thing as just moving the block.

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

Post to forums  

Forma Design Contest


Autodesk Design & Make Report