Help with lisp to move text to specific locations.

Help with lisp to move text to specific locations.

poffenberger83
Explorer Explorer
2,353 Views
7 Replies
Message 1 of 8

Help with lisp to move text to specific locations.

poffenberger83
Explorer
Explorer

I need help with a lisp to move multiple, (3)lines of text, to a point or an insertion point. I was helped the other day by a awesome individual who instructed me on using the Point Manager and then a lisp to move text to point, and it worked great. I'd like to somehow incorporate similar logic to move (3) lines of text (multiple (3)lines of text) to a common point relative to each set of (3)line text strings. Please see attachment for a visual narrative. Any help will be greatly appreciated. I'll also share the txt2pt code in the hopes that it maybe tweaked to work in this scenario. 

 

I'd like to thank you all advance,

 

Paul

0 Likes
2,354 Views
7 Replies
Replies (7)
Message 2 of 8

dbroad
Mentor
Mentor

Not a solution but hopefully a helpful query:  Why aren't you using blocks with attributes? Moving attributes in the block editor and using attsync would solve your issues and also give you a way to extract information to tabular form.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 8

devitg
Advisor
Advisor

Hi. poffenberger83 If you move as asked, the bottom green text will be over located at the black downward text .

see attached .

As you state

That truly is the goal. Once I have all the green text in the same exact spot respectively, then I can select similar and move it all to the final location.

 

Maybe it will be easy to align it to a "virtual" line .

0 Likes
Message 4 of 8

poffenberger83
Explorer
Explorer

All the text, line work and blocks are brought in from another program that has little to no functionality. So what we see is what we get. The green text is not a block it's just 3 lines of text stacked on top of each other. None or very few sets of green text is in the same location, so what I do is grab each of the 3 lines and move them to the insertion point of the text below it. This could and does usually mean a hundred or better individual moves. Then I simply select similar and move them all at once up one insertion point therefore leaving me with 4 perfectly stacked lines of text. I'm not sure how I could incorporate using blocks with out touching all hundred or so sets of green text anyhow. Sorry but I just don't follow you. Recently moved into more of a production style cad drawings, though I been using the program for years this style is allowing me to learn more things while shedding old habits.

 

Thanks for your input.

Paul

0 Likes
Message 5 of 8

poffenberger83
Explorer
Explorer

Thanks, I'll look into virtual lines and see how that could benefit. I'm afraid I'm not familar with the concept.

 

Thanks

0 Likes
Message 6 of 8

devitg
Advisor
Advisor
I mean to state a true and only target, as as you say, to the downward text, you have to pick it one by one . As I see the 3 green texts , maintain it´s relational position for each one . So it will be easy to select a virtual line by 2 points , whit the same Y , then select just one of the green text , and by a filter do a selection set . I will try it.
0 Likes
Message 7 of 8

devitg
Advisor
Advisor
As to have a clear view. Please upload a sample, but true DWG, at least with the green text and bus line . It shall show more than 3 rows. I want to know if there is a fixed relation between green text and other entity . Or you can send it to my mail
0 Likes
Message 8 of 8

dbroad
Mentor
Mentor

Depending on how the text elements were "brought in" from the "other program", you could have the text contents populated automatically into block attributes, assuming that the same fields are used in each node.

 

A good first step to keeping things organized would be to convert your individual lines of text into mtext using txt2mtxt, an express tool.

Architect, Registered NC, VA, SC, & GA.
0 Likes