I would like to sort text object on a layout (Title Block text like client info, title of page, page number, date…) by their specific layout name.
So for all the page layout in the document (Page 1, Page 2, Page 3…) I have a list of all the text objects by page layout:
Page 1: text A1, text A2, text A3…
Page 2: text B1, text B2, text B3…
Page 3: text C1, text C2, text C3…
I prefer to use the antiquated but fairly functional FabTools components.
See attached.
If a text has a name in the layout (Client Info, Title, whatever) you can control it by page via a Title= for example.re_Python-Layout-Name.gh (109.5 KB) RE_textbylayout.3dm (59.9 KB)
Thanks Rickson for the quick answer.
But…I have looked trought FatTools and I could not make what I am looking for, maybe I should have put more context.
I want to retreive the information from the texts in the layout to build a file naming to output all the layouts of the file as single pdf files. So for the three pages I would get a file named:
text A1-text A2-text A3.pdf for Page 1
text B1-text B2-text Bpdf for Page 2
text C1-text C2-text C3.pdf for Page 3
I haved test with this script for the pdf print and I think it will work, just need to retreive information from each layout…
How do you know what text goes first? Assuming that you have gathered all the text and sorted by view, you would need to know which one goes in what order.
The field I want to use are limited, so I was thinking this way:
text2 is the page number, so I can filter that if it start with a number
text3 is the state, either Wip, or Issued, I would filter in retrieving Wip or Issued
text 1 would be the Title of the page, this would be what is left, not filtered in text2 or text3
Have a look at this.
as @Rickson points, out you’ll need a system for sorting the text.
I haven’t done this but you could for example use Attributes or position to determine this.
Wow this is truly amazing and powerfull, just what I need !
Thanks !
I will take time and try to understand the code…
I thought about using user attributes, but this is simplier, since I only have to write in the title block
Documenttext variable is for MyPretend Company, found it !
I will have a go on my project file which has 40+ pages and tell you how it performs.
Ok now I get that it needs to be filtered. It is a bit slow.
By layer ?
I can put all the text needed on layer text_
I also undestand that I need to have allways the same munber of text on each page, since it is for a Title Block, it is ok.
Sorting I can do after in Grasshopper.
Thanks again