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

    27850
    Total Members
    6254
    Most Online
    heidimm
    Newest Member
    heidimm
    Joined
  • Similar Content

    • By ACADuser
      Looking at the ROOM data I'm not sure where the Room Area variable is.
      Looking at Joe's macro, he used obj.room.internal_area.round(2)
       
      It appears that the variable is already rounded. Not sure if this is new.
      What I wanted is the area the Room polyline is based on.  369.83  --> Measurement
      I see several area variables, but how to get the one I want?
      How do you know what prefix to get the area you want?
       
      Data Type: String
      base_moldings ------------------- size = 1 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      component_moldings ------ size = 0 ---------------------- Collection
      description ------------- "base molding: PVC 4" Base" --- String
      formatted_size ---------- "1x4" ------------------------- String
      length ------------------ 600 in ------------------------ Measurement
      room -------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      cantilever_underside_material --- ------------------------------ NVPublisher
      id -------------------------- 133 --------------------------- Integer
      name ------------------------ "Color - White" --------------- String
      ceiling_elevation --------------- 108 in ------------------------ Measurement
      ceiling_finish_layers ----------- size = 2 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      area -------------------- 373.153214 sq ft -------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "Square Ceiling Tiles" -------- String
      formatted_size ------ "24"x24"x1/2"" ---------------- String
      quantity ------------ 93.5 -------------------------- Measurement
      owner ------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 0.5 in ------------------------ Measurement
      [1] ------------------------- ------------------------------ NVPublisher
      area -------------------- 369.825474 sq ft -------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "Color - White" --------------- String
      formatted_size ------ "" ---------------------------- String
      quantity ------------ 369.825474 sq ft -------------- Measurement
      owner ------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 0 in -------------------------- Measurement
      ceiling_finish_name ------------- "Color - White" --------------- String
      ceiling_insulation -------------- ------------------------------ NVPublisher
      area ------------------------ 369.825474 sq ft -------------- Measurement
      cavity_r_value -------------- 0.0 --------------------------- Float
      continuous_r_value ---------- 0.0 --------------------------- Float
      depth ----------------------- 12 in ------------------------- Measurement
      formatted_size -------------- "12x24x48" batts" ------------- String
      length ---------------------- 48 in ------------------------- Measurement
      num_batts ------------------- 46.25 ------------------------- Measurement
      owner ----------------------- ------------------------------ NVPublisher
      SEE ABOVE --------------- ------------------------------
      width ----------------------- 24 in ------------------------- Measurement
      ceiling_platform_layers --------- size = 1 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      area -------------------- 0 sq ft ----------------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "Steel Stud 24" OC" ----------- String
      formatted_size ------ "" ---------------------------- String
      quantity ------------ 0 ----------------------------- Measurement
      rebar_length ------------ 0 in -------------------------- Measurement
      rebar_size -------------- 0 ----------------------------- Integer
      room -------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 2 in -------------------------- Measurement
      ceiling_thermal_envelope_area --- 369.825474 sq ft -------------- Measurement
      chair_rail_moldings ------------- size = 0 ---------------------- Collection
      crown_moldings ------------------ size = 0 ---------------------- Collection
      custom_pattern_scale ------------ 1.0 --------------------------- Float
      dimensions ---------------------- "14'-10" x 23'-10"" ----------- String
      drawing_group ------------------- default:_35_-_room_fill ------- Symbol
      fill_line_weight ---------------- 1 ----------------------------- Integer
      finished_ceiling_elevation ------ 107.5 in ---------------------- Measurement
      finished_floor_elevation -------- 0.125 in ---------------------- Measurement
      floor_ceiling_group ------------- 1 ----------------------------- Integer
      floor_elevation ----------------- 0 in -------------------------- Measurement
      floor_finish_layers ------------- size = 1 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      area -------------------- 371.216099 sq ft -------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "Floor-C4 Laminate" ----------- String
      formatted_size ------ "1/8" thick" ------------------ String
      quantity ------------ 371.216099 sq ft -------------- Measurement
      owner ------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 0.125 in ---------------------- Measurement
      floor_finish_name --------------- "Floor-C4 Laminate" ----------- String
      floor_insulation ---------------- ------------------------------ NVPublisher
      area ------------------------ 0 sq ft ----------------------- Measurement
      cavity_r_value -------------- 0.0 --------------------------- Float
      continuous_r_value ---------- 0.0 --------------------------- Float
      depth ----------------------- 12 in ------------------------- Measurement
      formatted_size -------------- "12x24x48" batts" ------------- String
      length ---------------------- 48 in ------------------------- Measurement
      num_batts ------------------- 0 ----------------------------- Measurement
      owner ----------------------- ------------------------------ NVPublisher
      SEE ABOVE --------------- ------------------------------
      width ----------------------- 24 in ------------------------- Measurement
      floor_number -------------------- 1 ----------------------------- Integer
      floor_platform_layers ----------- size = 2 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      area -------------------- 0 sq ft ----------------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "OSB-Hrz" --------------------- String
      formatted_size ------ "48"x96"x3/4"" ---------------- String
      quantity ------------ 0 ----------------------------- Measurement
      rebar_length ------------ 0 in -------------------------- Measurement
      rebar_size -------------- 0 ----------------------------- Integer
      room -------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 0 in -------------------------- Measurement
      [1] ------------------------- ------------------------------ NVPublisher
      area -------------------- 0 sq ft ----------------------- Measurement
      material_data ----------- ------------------------------ NVPublisher
      description --------- "Concrete" -------------------- String
      formatted_size ------ "4" thick" -------------------- String
      quantity ------------ 0 cu ft ----------------------- Measurement
      rebar_length ------------ 0 in -------------------------- Measurement
      rebar_size -------------- 0 ----------------------------- Integer
      room -------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      thickness --------------- 4 in -------------------------- Measurement
      floor_thermal_envelope_area ----- 369.825474 sq ft -------------- Measurement
      function ------------------------ "Living" ---------------------- String
      internal_area ------------------- 370 sq ft --------------------- Measurement
      layer --------------------------- rooms ------------------------- Symbol
      layer_line_color ---------------- 2151678207 -------------------- Integer
      layer_line_style ---------------- 111 --------------------------- Integer
      layer_line_weight --------------- 18 ---------------------------- Integer
      layer_set ----------------------- "Floor Plan" ------------------ String
      layer_text_style ---------------- "Default Text Style" ---------- String
      moldings ------------------------ size = 1 ---------------------- Collection
      [0] ------------------------- ------------------------------ NVPublisher
      component_moldings ------ size = 0 ---------------------- Collection
      description ------------- "base molding: PVC 4" Base" --- String
      formatted_size ---------- "1x4" ------------------------- String
      length ------------------ 600 in ------------------------ Measurement
      room -------------------- ------------------------------ NVPublisher
      SEE ABOVE ----------- ------------------------------
      name ---------------------------- "Shared Medical" -------------- String
      pattern_angle ------------------- 0.0 --------------------------- Float
      pattern_horizontal_spacing ------ 8 in -------------------------- Measurement
      pattern_vertical_spacing -------- 8 in -------------------------- Measurement
      perimeter ----------------------- 1020.936748 in ---------------- Measurement
      schedule_number ----------------- "R69" ------------------------- String
      simple_schedule_number ---------- "69" -------------------------- String
      standard_area ------------------- 389 sq ft --------------------- Measurement
      stem_wall_height ---------------- 16 in ------------------------- Measurement
      stem_wall_top_elevation --------- 0 in -------------------------- Measurement
      type_name ----------------------- "Office" ---------------------- String
      volume -------------------------- 3309.16752 cu ft -------------- Measurement
      wall_coverings ------------------ size = 0 ---------------------- Collection
      wall_material ------------------- ------------------------------ NVPublisher
      id -------------------------- -32765 ------------------------ Integer
      name ------------------------ "No Change" ------------------- String
       
    • 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?