MarkMc Posted June 2, 2017 Share Posted June 2, 2017 I thought I had something for doing this but can't find it and can't make it work. Am I dreaming? Is there a way to insert a carriage return when editing "page information, title"? Thought that could be done with Ruby? Link to comment Share on other sites More sharing options...
BrownTiger Posted June 2, 2017 Share Posted June 2, 2017 Like this A + "\r\n" + B 1 Link to comment Share on other sites More sharing options...
MarkMc Posted June 2, 2017 Author Share Posted June 2, 2017 9 minutes ago, BrownTiger said: Like this A + "\r\n" + B kinda what I tried first with no joy, Thought I had a macro that was just a carriage return, tried remaking the macro but something not working. Get the same result using that. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted June 2, 2017 Share Posted June 2, 2017 Mark: Macro Name Enter Macro Content "\n\t" Evaluated Context None In the Page Info put %Enter% where you want a new line. \n is "New Line" \t is "Tab" You don't really need the "Tab" so "\n" should be sufficient. 1 Link to comment Share on other sites More sharing options...
MarkMc Posted June 2, 2017 Author Share Posted June 2, 2017 14 minutes ago, Joe_Carrick said: Evaluated Context None That was what I had missing- did not evaluate, since it had a check figured I was ok. Both sets of code work, thanks guys. Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 On 6/2/2017 at 5:35 PM, Joe_Carrick said: You don't really need the "Tab" so "\n" should be sufficient. Just went to my page table and using any version of the macro mucks it up- makes whatever is after the return macro move to the page column while creating a new line there. Any way around that? Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 6 minutes ago, solver said: where the macro is "\n\t\t" I want to keep it on the same line, I also don't want it to expand into space- here's what I get with "\n\t\t" Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 (edited) 16 minutes ago, solver said: You would like this? I'd settle for that if it's the best I can get. I need the return to fit well in my pages SO I'm placing this in the page title not in the page table. AFAIK I also used two tabs? "\n\t\t" as in last screen shot. Edited June 5, 2017 by MarkMc Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 Here is with no macro- as close to this is what I'm after, will settle for two lines on page title in the same cell. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 5, 2017 Share Posted June 5, 2017 I'm away from my computer so I can't test anything but here are a couple quick notes from my personal experience. 1. Using newlines to affect schedules is hardly useful. I've played with it when trying to achieve some unusual outside the box type solutions but I don't believe I recall having ever actually ended up using it. 2. To get multi-line cells I usually add spaces and not newlines. If you add the appropriate number of spaces and adjust the column width appropriately you should probably be able to get what you're after that way. Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 On 6/2/2017 at 4:47 PM, MarkMc said: Is there a way to insert a carriage return when editing "page information, title"? Eric- Above is what I asked for in the first place. I want to add a line return to the page information like this where it shows up in the layout page like this I'm beginning to think Michael is correct, the only way to do what I'm after is with spaces-which is a trial and error PIA where I started. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 5, 2017 Share Posted June 5, 2017 33 minutes ago, MarkMc said: Eric- Above is what I asked for in the first place. I want to add a line return to the page information like this where it shows up in the layout page like this I'm beginning to think Michael is correct, the only way to do what I'm after is with spaces-which is a trial and error PIA where I started. Okay. Now this is starting to make more sense to me. You're trying to affect the page title without affecting the schedule? I think there is another way. I'll try to help you out when I get back to my computer. In short though I'm thinking you need to use a newline macro that contains a conditional statement of some sort. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 5, 2017 Share Posted June 5, 2017 2 minutes ago, solver said: If you copy/paste from a word doc, you can embed the newline. Interesting. FWIW, depending on the situation there are other ways to get newlines as well such as... " " Link to comment Share on other sites More sharing options...
Joe_Carrick Posted June 5, 2017 Share Posted June 5, 2017 2 hours ago, MarkMc said: Just went to my page table and using any version of the macro mucks it up- makes whatever is after the return macro move to the page column while creating a new line there. Any way around that? Did you try the "\n\t" macro? It will add the tab so that the text is in the 2nd column. You will still get an extra box because you include the grid lines. I don't use the border or the grids so it looks better IMNSHO Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 1 minute ago, Joe_Carrick said: Did you try the "\n\t" macro? It will add the tab so that the text is in the 2nd column. You will still get an extra box because you include the grid lines. I don't use the border or the grids so it loos better IMNSHO Yes- tried every variation you guys posted. No borders may be an option. 17 minutes ago, solver said: If you copy/paste from a word doc, you can embed the newline. I get the same result that way as using the macro. Hoping Michael has some magic- else it's add spaces OR no border OR change the size of something (nah) OR paste a text box over that in the layout page since the page table reads fine. Link to comment Share on other sites More sharing options...
Joe_Carrick Posted June 5, 2017 Share Posted June 5, 2017 15 minutes ago, MarkMc said: Yes- tried every variation you guys posted. No borders may be an option. I get the same result that way as using the macro. Hoping Michael has some magic- else it's add spaces OR no border OR change the size of something (nah) OR paste a text box over that in the layout page since the page table reads fine. Mark, I just tested it and the macro with "\n\t" in it works for me even with the Grids and Border. Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 9 minutes ago, solver said: Yes there is. Several ways have been shown. What are you after? What are you trying to do that you cannot do? I showed what I want, two lines in one cell. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 5, 2017 Share Posted June 5, 2017 13 minutes ago, MarkMc said: I showed what I want, two lines in one cell. Okay, now I'm confused again. Do you actually want 2 lines in the CELL or do you want 2 lines in the TITLE? Or do you actually want 2 lines in both? Link to comment Share on other sites More sharing options...
MarkMc Posted June 5, 2017 Author Share Posted June 5, 2017 I want two lines in the title on the layout page. I want one cell in the page table, prefer one line in table but would settle for two as long as it's one cell. If that can't happen I'll use spaces as you submit OR over write with a text box on the layout page. Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 6, 2017 Share Posted June 6, 2017 Okay Mark, just got back to the office. Here are 2 options for you. Option 1: Use an evaluated owner context macro that looks something like this... if object_type.to_s.downcase == "schedule" result = " " else result = "\n" end NOTE: You could use any number of different attributes other than the object_type (layer for example) but that one seems to be as good as any for this particular item... Option 2: Don't use a macro at all. Just resize your title's text box to the maximum width you would like to see (should automatically uncheck Auto Width) and then Center Justify it. This will cause the text to display as multiple lines on your title block but not in the Layout Page table or in the project browser. Hope one of those options gets you what you want. 1 Link to comment Share on other sites More sharing options...
MarkMc Posted June 6, 2017 Author Share Posted June 6, 2017 23 minutes ago, Alaskan_Son said: Okay Mark, just got back to the office. Here are 2 options for you. Option 1: Use an evaluated owner context macro that looks something like this... if object_type.to_s.downcase == "schedule" result = " " else result = "\n" end NOTE: You could use any number of different attributes other than the object_type (layer for example) but that one seems to be as good as any for this particular item... Option 2: Don't use a macro at all. Just resize your title's text box to the maximum width you would like to see (should automatically uncheck Auto Width) and then Center Justify it. This will cause the text to display as multiple lines on your title block but not in the Layout Page table or in the project browser. Hope one of those options gets you what you want. Thanks Michael- will try the macro later tonight. Not sure I understand the use of "schedule" for a page table- but then my Ruby is pathertic Already did the text box, doesn't break the lines where I want. Spaces work but it doesn't update live and I have several of these on current layout which is why I wanted a macro. Wondering if A-I put the text with line breaks all into a macro B-then just place the macro to the page title- which results in the text formatted to two lines-then the line break might not interact with the cells?. If I can figure that out then was thinking I could do that with each of the titles I need into one macro-then figure out a way to call one or another or just comment the ones I don't want out. More than I know how to do even if possible so would take me a while to sort-could be useful in the long run as I've used these titles before... but not got the time to go into that rabbet hole right now. Will see. (wish I understood Ruby better, always impressed at how quickly you picked it up. My only excuse is age but then Yoda is olderndirt) Link to comment Share on other sites More sharing options...
Alaskan_Son Posted June 6, 2017 Share Posted June 6, 2017 5 hours ago, MarkMc said: Thanks Michael- will try the macro later tonight. Not sure I understand the use of "schedule" for a page table- but then my Ruby is pathertic Already did the text box, doesn't break the lines where I want. Spaces work but it doesn't update live and I have several of these on current layout which is why I wanted a macro. You're welcome. A couple more quick notes based on the above... 1. object_type is just one of the many attributes we have available. A layout page table is nothing more than a schedule and that is its object type... thus the reason for using "schedule". It just makes sense to use that particular object type as a qualifier because inside schedules is about the only place that newline wouldn't work quite right. That macro just tells Ruby to display a newline everywhere except inside schedules where it will simply display a single space. 2. Not sure whether you thought of this or not, but you can always copy/paste in place that title block text box onto every page instead of placing it on page zero. That way you can get the break wherever you want it for each and every page. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now