MarkMc

Carriage return in layout title page information-Ruby?

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

return.png

Share this post


Link to post
Share on other sites

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.

  • Upvote 1

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Page Title with macro.png

Resulting page table.png

Share this post


Link to post
Share on other sites

Are you trying to keep the 2nd line within the same cell, or just move down a line in the table?

 

Title Line 1%r%Title Line 2

 

where the macro is "\n\t\t"

 

does this

 

Snap1.thumb.png.7ab7080ac35fd942ffd1a6c5ab26eaaa.png

Share this post


Link to post
Share on other sites
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"

Screen-2017-06-05_15-42-51.png

Screen-2017-06-05_15-43-09.png

Screen-2017-06-05_15-44-05.png

Share this post


Link to post
Share on other sites

I used 2 tabs to move over 2 columns in my example.

 

You would like this?

 

Snap1.thumb.png.0842024c20a18371c31f0149f0f66e68.png

Share this post


Link to post
Share on other sites
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 by MarkMc

Share this post


Link to post
Share on other sites

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.

Page table.png

Share this post


Link to post
Share on other sites
3 minutes ago, MarkMc said:

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.

 

I'm completely confused. 

 

If not using the macro gives you what you want, why use the macro?

 

In #7, I showed placing the part after the macro on a 2nd line, and in #9, I showed it in the same cell -- which I don't believe can be done.

 

The tabs move over one column, so in your case, you would use 1 tab.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

5935c28a6d360_Pagetitle.thumb.png.7457640fc95f1a57f6b64a54f7e0da6d.png

 

where it shows up in the layout page like this

5935c29dee721_Layoutpage.thumb.png.3c0ba2271fca09264b40024438841c10.png

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.

Share this post


Link to post
Share on other sites

I know I'm missing the obvious.

 

In layout, I added the %layout.title% macro.

 

Snap3.thumb.png.caf9ea39f766bcac4499aa7a1ee2744f.png

 

Snap2.thumb.png.19ec6fa1bff344ac563391ddc6dd633e.png

Share this post


Link to post
Share on other sites
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

5935c28a6d360_Pagetitle.thumb.png.7457640fc95f1a57f6b64a54f7e0da6d.png

 

where it shows up in the layout page like this

5935c29dee721_Layoutpage.thumb.png.3c0ba2271fca09264b40024438841c10.png

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.

Share this post


Link to post
Share on other sites

If you copy/paste from a word doc, you can embed the newline.

 

Snap4.thumb.png.bb844126b547a85deb2df549574ea06e.png

Share this post


Link to post
Share on other sites
2 minutes ago, solver said:

If you copy/paste from a word doc, you can embed the newline.

 

Snap4.thumb.png.bb844126b547a85deb2df549574ea06e.png

Interesting.  FWIW, depending on the situation there are other ways to get newlines as well such as...

 

"

"

Share this post


Link to post
Share on other sites
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?

Resulting page table.png

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 ;)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Marks Macro test..JPG

Share this post


Link to post
Share on other sites
1 hour 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

5935c28a6d360_Pagetitle.thumb.png.7457640fc95f1a57f6b64a54f7e0da6d.png

 

where it shows up in the layout page like this

5935c29dee721_Layoutpage.thumb.png.3c0ba2271fca09264b40024438841c10.png

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.

 

Yes there is. Several ways have been shown.

 

What are you after? What are you trying to do that you cannot do?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Member Statistics

    27613
    Total Members
    6254
    Most Online
    3dvfxarch
    Newest Member
    3dvfxarch
    Joined
  • Similar Content

    • By ccarpenter18
      In X12 I've noticed that when using Structural Member Reporting in a material list, the price column in the list does not appear to be sensitive to whether a "per unit" or "per length" calculation is being performed by the material list.  In both cases, the material list appears to use the same Price variable in the Component Panel of each object.  Does anyone know of some Ruby scripting that could be used to correct this?  Off hand, I'm thinking of a macro inserted into the Price variable on the Component Panel of each structural member that would use the Material List row context to report a price that depends on how the row wants to use the Price.
    • By community
      Hello,
      Just throwing the question out here: Is it possible to write a custom script for X10 to make the program export a custom materials list with some calculated fields and some custom formatting, like a header with our logo?
      If so, would anyone have an idea where I could turn to have this done for me?
       
      Kind regards
    • By BrownTiger
      The Andersen 100 Series windows [Fiberex] are always popular with a builders. Primarily, they offer different interior and exterior colors, not as ugly as some other Vinyl... Sometimes designer want to know if he is using standard vs custom sizes [adds +$$].
       
      So here is a validator macro, that can be assigned as a label or just executed in the tmm
       

       
      Free Macro, enjoy
      Code demonstrate use of Ruby arrays, and "any?" method.
       
      BT
      I also have A200,400, and pella.. But this will get you started if you are not 100% familiar with Ruby.
      Andersen100Units.json
    • By Doug_N
      In doing some ruby stuff to automate information required by building department code examiners, so I wrote a bit of simple code
       
       
       

       
      to get this. 
       
      But I need that in an elevation, not in a plan view.  No joy it seems.  
       

       
      Anyone know why this is?
       

    • By GerryT
      Revit, Rhino, Vectorworks and Allplan all have Python support. Form-Zis working on Python. Sketchup does ruby.
       
      Although i do think that Python may integrate better, I still think Ruby is a easier language to learn for the novice. And ruby 3 will have some advanced features.
       
      Wonder where Chief is and what is their position is now? -- With a few improvements and a keyboard interface using Chief's hotkeys, I think Chief's Ruby API could quickly rival the above in versatility? Are Chiefer's going to be left behind? What do you think? Open up Data Access in CA.