TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: kruuger on July 07, 2015, 05:38:29 PM

Title: Work with nested TEXT inside block
Post by: kruuger on July 07, 2015, 05:38:29 PM
hello
have a block which includes some TEXT object.
some TEXT are under group 1, another group2, group 3 etc.
now i would like to manage these TEXT but from outside of the block.
for example:
- would like to clean item 1,1A under group 1 (replace 1,1A with - sign)
- add row to group 1, so move texts, 1-1A, 2-2A, 3-3A one line down
- swap line so a-aa copy to b-bb position and b-bb to a-aa
- delete, copy line etc


i'm thinking to get all TEXT entities from the block sort them by Y and than X and put them on the list. than play with move, copy, insert lines.
is this a good attempt ?
thanks
kruuger
Title: Re: Work with nested TEXT inside block
Post by: Lee Mac on July 07, 2015, 06:24:04 PM
I would use a 'groupbyfunction' function and group the text objects by the common y-coordinates (to a tolerance) in their insertion points - here (http://www.theswamp.org/index.php?topic=40483.msg457902#msg457902) is a similar example of such a grouping.

I hope this helps.

Lee
Title: Re: Work with nested TEXT inside block
Post by: kruuger on July 08, 2015, 10:39:58 AM
I would use a 'groupbyfunction' function and group the text objects by the common y-coordinates (to a tolerance) in their insertion points - here (http://www.theswamp.org/index.php?topic=40483.msg457902#msg457902) is a similar example of such a grouping.

I hope this helps.

Lee
thanks Lee.
should be very helpfull
k.