Page Layout Tools

On this page I am collecting page layout tools that I am working on regularly.

All latest versions of these scripts can be downloaded from my github. Advised is to download github for desktop to keep the files in synch with any changes and bugfixes.

Adds scale info as a caption to a (preselected) detail

This tool adds annotation balloons to Blockitems on a page. After that you can run script (below) to add a part list

adds a partlist based on the annotation balloons. (Double items will be neglected and their balloons removed from the canvas in v.0.3)

This script will align details and match their scale. Front to Top and vice versa; Right to Front and vice versa

This tool will align vertical and horizontal dimensions to a user picked point. It can do both at the same time:

Organizes dimensions and other annotation objects to dim and annotation layer

Organizes all details to detail layer with green color (visible but less obtrusive as the lines of details don’t print)

(generating projected views from selected detail)

This is just a set of utilities being used in other tools

Adds page_scale user text to a layout page

Adds a page scale if not set (script 11)
Changes the scale of the details to the page scale

Changes all details and page to the same selected scale in one operation

Sets a predefined scale from a list for selected detail(s), defaults to page scale

toolbar icons from left to right:
align details, align dims, set detail scale, add titleblock, organize details/annotations, balloon, part list, tilt view, set page scale, projected view
align_details aligndims organize_details2 organize_details2 import_titleblock balloon part_list tilt_view set_page_scaleprojected_view2


I want to bump this one to the top once to ask if there are people that have tested the tools I posted and if there are requests for additional tools.
Just added dim alignment tool to the list.

Next thing I want to build is a titleblock that can be added to the page with one click. Shouldn’t be that hard I guess.

side note: just found out that these wiki pages edits are only saved as a different version when another user adds something. So the above only shows 1 edit, while it has been adjusted couple of times. But I think this is ok

Dim alignment looks great, I will look at the rest soon… can you post a small video like this for the balloons?

here a more ‘real life’ result using the balloons and part list:


I hope to have some time to try these out. They look so good. Thanks for sharing!

Thank you for this useful scripts.

It is possible to change the script 03 annotationBalloons to work with regular objects? I am not using blocks too often but simply objects and I need to create BOMs using them.

That’s possible I think, you will need to go through both the annotationBalloon code as well as the addPartlist code and replace the code that looks for blocks to work with regular objects. Make sure you have the objects you want to annotate named so you can count them.

@Gijs: Do you have experience on creating components for Grasshopper?

I need some GH components to create drawings straight on Layouts. I do found ones that can do what I need, they are called FabTools, but unfortunately they are not working with Rhino6 and later and the author it is not responding to emails.

no, I don’t have any experience yet making gh components, and I guess it won’t be anytime soon that I will dive into that either.

Not sure how I missed this, Thanks @Gijs

I’ll probably have a lot of questions today…also, can you please let us know if you have a page or something dedicated to your scripts like peters tools. That way I can find the most up to date version?

@Macuso Hi. Any updates on FAB tools? Or your research on a BOM generator?
Or your attempts at using regular objects vs blocks for @Gijs 's script?


Replied your pm as well, but most recent versions are best to be downloaded on my github page.

I just updated the code for align details (see gif in first post) as it contained some bugs.

code for adding BOM to the document ( has been updated:
now the partlist is not simply added to (10,10) on the page but at a user specified point (aligning to either lower left, lower right, upper left or upper right corner of the table)
furthermore double annotated objects are ignored in the partlist and their balloons removed from the drawing.

Thanks Gijs I will have notes on this probably sometime next week I can’t wait to get to it

Hi Gijs - This looks really good. I have yet to get V7 (still using V5 because of the many related plugins) but will be upgrading next month. Your scripts are one of the first things I’ll be looking at.

Until then, Questions!:

Once a balloon is placed, is it possible to edit/relocate the balloon-end and still keep it aligned with the leader? Are the tips of the leaders governed by a dimension style?

For the parts table, is it fairly straightforward to customise the numbers of columns and their relative widths? Can headings be added to to the top / bottom of each column?

Thanks, Matt

Hi @MattE, glad you like it. To answer your questions:

The balloon, number, leader and tip are individual objects I create on the fly and group together. You can modify (point edit) them just like regular Rhino objects.

The tips are currently drawn objects (with hatch fill). I haven’t thought of using a leader for this, but I might change that depending on suggestions. I have to check if I can use leaders this way. What leader tips would you use?

Currently the table widths and #of columns are hard coded, it’s all drawing with lines. But share your requests on this and I’ll see if it is feasible to adjust the code to make this a bit more flexible.

Currently no, but should be simple to add that.

Hi @Gijs - from the top:

As I’m still on V5 I haven’t been able to try out the scripts yet, so my only knowledge of what they can do is taken from the clips you’ve posted.

As you’ve described the construction of the leaders, unfortunately it doesn’t sound as though editing the position of the balloons will be any less painful than my current method. If you have 50+ balloons clustered around a single view, invariably an element of repositioning is required, either to prevent leaders crossing or simply to make space for more balloons. Conventional editing by means of control points doesn’t work - the leader can’t maintain perpendicularity to the balloon because the leader CP is on the balloon circumference. If it were at the balloon centre, editing would work but the leader tail would be visible inside the circle. If the balloon had a ‘mask’ in the form of a solid hatch the colour of the background, it could perhaps work. I’ve played with that manually but Display Order becomes a problem.

The tips of the leader as you create them in the script may be a blessing in disguise. I’m currently having a lot of problems getting balloon leaders to export correctly to dwg format. It appears the developer has decided it’s a good idea to add a horizontal tail to leaders on export, if they originally consist only of a single stroke (as is the case with most balloon leaders). This screws up the alignment of the leader to the balloon circle. Even worse, Solid Edge handles import of dimension leaders in dwg format along similar lines, so the problem gets compounded. However, if the leaders are treated as simple ‘dumb’ geometry (lines and circles) then the export/import meddling is no longer an issue. So although you loose the niceties of having proper leader arrows and dim styles, the export does at least remain faithful to the original Rhino file.

For parts tables, if the layout of the script is easy to understand and edit, then that is probably the simplest solution. Trying to keep everyone happy for this aspect will be impossible as there are so many variations users will ask for.

This is true, but if you make leaders always end vertical or horizontal, it should be quite painless to make edits as you can move the circle and first part of the leader together:

Yes, just tried that and when I do this in the script, the hatch is behind the leader. SendToBack on the leader helps, but I’m unsure if this will be reliable across applications, so I removed this code again.

But I’m thinking of another possible solution: making the script such that you can update the leaders as soon as you are ready making the edits, I’ll see if this can be easily done.

If text masks had a “circular” option, and it were sized to match the balloon, that would be a neat fix. In V5 at least, text masks are always square/rectangular, it seems. I’m not sure if V6/7 offer more options.

1 Like

@zale_orcid and others I added new tools to the page layout tools on my github, as well as fixed some bugs in them. In the first post I added icons for the tools.
Most notable new things are:

  • you can now add a page scale to a page (using user text page_scale) and add specified scales to details (using user text detail_scale) where you can apply distinct scales from a dropdown. The dropdown will default at the current page scale:
  • You can set all details on page to the page scale in one go.
  • using this added page_scale to the layout page you are working, means you can also insert this into your titleblock:
    using the text fields:

This way if you save the text field in your titleblock, the scale will read #### if not set