Rotate multiple text to first closest layer

Rotate multiple text to first closest layer

Fleww
Advocate Advocate
3,337 Views
27 Replies
Message 1 of 28

Rotate multiple text to first closest layer

Fleww
Advocate
Advocate

2.jpg

1.jpg

First picture what it needs to look like, and second is what we get from program raw file.

I need lisp or plugin what ever to automatize this for me even little. I am wiling to pay for it just need to make sure it works. We hardly need it for work couse I need to rotate each text and put it near this builing in topography. I get it with rotation by cable that coming to house but I want something to put it near first layer it will be Building layer that layer are all houses here. Rotation will be enough. If you need more details please contact me.

0 Likes
Accepted solutions (3)
3,338 Views
27 Replies
Replies (27)
Message 21 of 28

Fleww
Advocate
Advocate

Man, I just first of all want to say to you I love you, THANK YOU SO MUCH! You are unbealivable ! this is so crazy u make my life easyer Im so happy. Can't tell you enough how much you helped me.!!!!

I have 1 more question when you did this everything is possible so I want to please you one more thing, can this rotation be, for me now its almost perfect but if this lisp could just do 1 more thing, rotate it to angle of that layer like it did it but on longest size, so if its Building it should be on just like 5cm side instead of 2cm. Anyway this is brilliant but if you do that idk what to say im so shocked right now!! ❤️

0 Likes
Message 22 of 28

Kent1Cooper
Consultant
Consultant
Accepted solution

@Fleww wrote:
.... if this lisp could just do 1 more thing, rotate it to angle of that layer like it did it but on longest size, so if its Building it should be on just like 5cm side instead of 2cm. ....

I'm glad you like it.  The positioning and rotation based the longest edge is certainly possible, but with the variety of building shapes will take some figuring out [it would be a lot easier if they were all just rectangles].  I can't work that out right at the moment -- I'll have to play with it later, if someone else doesn't beat me to it.

Kent Cooper, AIA
Message 23 of 28

Fleww
Advocate
Advocate

Ok thank you so much, I can't thank you enough belive me. ❤️

0 Likes
Message 24 of 28

Kent1Cooper
Consultant
Consultant
Accepted solution

@Kent1Cooper wrote:
.... I'll have to play with it later, if someone else doesn't beat me to it.

 

Attached is a greatly improved but still imperfect routine.  It doesn't do quite what's in your private-message image, because the locations were too arbitrary to determine how to assign them, but puts things kind-of like most positions in your Message 1 image, with results like this:

TALBE.PNG

NOTE SEVERAL THINGS:

 

Some of the caveats from my earlier routine still apply [doesn't reposition the numbers, uses closest building it finds which may not always be the right one, those near a Servicebox but not a Building use nearest Building however far away, etc.].

 

It finds the longest segment of the Building-Layer object it finds nearby [arbitarily one of them if it finds more than one in the same selection attempt], aligns the Text with that, changes its justification to Middle-Center and places its insertion point outboard [most of the time -- see below] of the midpoint of that longest segment by a distance of the Text height.

 

Where two building perimeters abut along a shared longest segment, as in the ...KA36 and ...KA37 ones in the image above, assuming the routine "saw" the right building in relation to each, the Text pieces should end up outboard of the applicable building, and therefore each inside the other  building.  So you definitely will still need to do some cleaning up and checking, and figuring out where to place Text in those kinds of relationships.

 

For some reason I haven't figured out yet, it sometimes puts some of the Text objects inside rather than outside the buildings [see the ...KA16 one in the image], but if I run the routine again on those, they go outside.

 

If a building has more than one segment of equal length [such as a true rectangle or square], it will use the down-stream-most segment.  You may prefer the opposite side of a rectangle, or some other side of a square, but in any case, the longest segment may not always be the best reference for your purposes.

 

If any Mtext objects are multiple-line, the insertion point at the middle-center will still be placed outboard of the building by the text height, so the content will probably always overlap the building.

Kent Cooper, AIA
Message 25 of 28

Fleww
Advocate
Advocate

This is so good and thank you so much on your work, this is unbealivable. God bless you. ❤️

0 Likes
Message 26 of 28

Fleww
Advocate
Advocate

Dear Kent1Cooper, I am grateful for everything you have done for me so far it's truly impressive! Can I please you an addition to this LISP, such that when it rotates text, it never overlaps with the "Topography" and "Microrohr" layers, and it chooses the other side of the "Building" layer to avoid overlapping with these first two layers.

0 Likes
Message 27 of 28

Kent1Cooper
Consultant
Consultant

@Fleww wrote:

.... an addition to this LISP, such that when it rotates text, it never overlaps with the "Topography" and "Microrohr" layers, and it chooses the other side of the "Building" layer to avoid overlapping with these first two layers.


That's a very difficult thing to do, if it's even possible.  It would be much easier if the Text rotations were always orthogonal, and it could use their bounding boxes to check whether they overlap something on a Layer to be avoided.  But the bounding box of non-orthogonally-oriented Text is still orthogonal, so it could catch things that the Text itself doesn't actually overlap.

 

And what if there are things on Layers to be avoided on both sides of the edge in question?

Kent Cooper, AIA
Message 28 of 28

Fleww
Advocate
Advocate
Okay thanks anyway, you already made this super easy God bless you. 🙂
0 Likes