Automatic fill in paper size by title block and sheet

Hi all,

In my quest to get human errors out of the workflow I encountered the following problem.

I am trying to make a script that fills in the paper size of the sheet automatically so we don’t have to do this by hand anymore and also to prevent that the print PDF script doesn’t print the wrong paper size since that one works with this parameter.

I have all the right sheets I need to print. I also have all the paper sizes of those sheets based on the type of Title block that is used. However when I run the script only some of the Sheets get updated, others do not.

I get the following error: " The parameter storage type is not an element".

The parameter I want to fill in is a text parameter set to work as an instance. When I check it manually I can fill it in no problem. But with Dynamo I somehow get an error.

All help is welcome!

With kind regards,

Daan

papier%20formaat

You are pushing the elements themselves into a text parameter, get the information in string format to push into your parameter. For instance, ask the elements for their Type Name and push that into SetParameterByName

1 Like

I use a dictionary for this one.

I read -from the Titleblock- the builtin parameter for Sheet Width and Sheet Height, feed that in the Dictionary and it produces my paper size in DIN format, and set it back to the titleblock.

BPM-SheetSize.dyf (7.4 KB)

Ah yes off course, thanks!

I fixed it with the String from Object node and now it works fine.

@Otto_Orlando am just a beginner, but in part two it seems like you are assuming that your titleblocks and sheets are in the same order.

The third part could(edit) fix this by filtering these two against eachother.

I think you could use “element owner view” node to get the sheet which a titleblock is on, this way they are in the same order.
Edit to clarify…
If you attatch an element owner view to the “all elements of titleblock category” node you can get a list with sheets that are in the same order as your titleblock list

I believe it’s from clockwork package.

If someone with more knowledge can correct me if I am wrong that would be great.

I think if you add a watch node to both “all elements of category” nodes you will see that the order of the output is correct based on your input order

Your Title Blocks are the value, The Sheets are the elements. So you need to switch those two.

I dont think thats the problem.

His titleblocks are set as the values, but his sheet list order doesnt correspond with his titleblock list order.
@Otto_Orlando
If you add the element owner view and use that as input for your sheets in set parameter you will get your desired results

Edit: Element.OwnerView is from the clockwork package

you’re right I saw the elements and value wrong. I am just wondering which sheets he is using in part 2. Are those the same as from the Schedule? Now it does not look like it. It looks like he is using all sheets in the project. The use of levels should take care of the right order of sheets i guess.

That depends wether he changed a sheet size after creating sheets.

Without using the element ownerview you risk using a wrong order.
If you create a sheet with a A1 titleblock but later decide to change this size to A2, the sheet and titleblocks are out of order. Using levels wont solve this issue.

In part 3 he does basically what my part 2 does but the long way around :slight_smile:

He is feeding ALL sheets to the set parameter node but i dont think that matters since he is using ALL titleblocks, and you cant have a titleblock without a sheet (if i am correct)

What is the point of having this kind of script if you can’t use it when you change your Title Block? That is the whole point why I have this script…

You can also bypass the whole problem by giving the Title Block Family a text with the right size and just let it turn visible when selecting the desired size I guess.

As I said, this script works fine but if you try to rely on placement order for both sheets and titleblocks you are at risk of getting wrong values.

This problem only exists in part two of the script Otto showed.
I resolved that issue by placing an element owner view node in part two, as shown in the attached picture of my previous post.

Otto asked why his results were out of order and I showed a solution and a reason for his misplaced sizes.

The reason to use this script is for adding the size in a sheet schedule. Ideally you want to see in the schedule what sheet size a certain sheet is.

1 Like

I am still looking why I don’t need the element owner node to make it work, and I see that the difference between the scripts is that I’m using the ‘in’ values of the filter.bool.mask. That way I get the right sheets and the right title blocks that go along with those sheets in then change the parameter.

However, glad the element owner node is working for you!

That’s what I said, part 3 is filtering in a way that matches the correct sheet to the correct titleblock. It does this by comparing sheet numbers.

The less complicated way is to use a element owner node. This directly finds the corresponding sheet fora unique titleblock

Glad to have helped @Otto_Orlando, graag gedaan!