The Placement of views on sheets program is not working properly

Placement of views on sheets
I tried running the Dynamo file I downloaded from this site, but it did not work. I have no guesses as to the cause.
I would like to know how to solve this problem.
I did this in Revit 2023.



Old code to start with in the Python.
UnitType was replaced a couple of versions ago.
UnitType Enumeration (revitapidocs.com)

Thank you for your response.
I have read the link you gave me.

I know this is a very brazen request, but how exactly do I change the code to make Dynamo work correctly?

I would appreciate it if you could tell me.

You replace the UnitType with SpecTypeId as per the API documents in the link.

1 Like

Hi @s.iwasaki! Sorry that the sample isn’t working. We’re behind on updating the primer for Revit 2023+. I went through and made some updates to this one though - can you try the attached version? It’s working for me in Revit 2023.

matterlab_Create-sheets-for-existing-views.dyn (319.6 KB)

Thank you for your kind attention.
I immediately tried to run the file you sent me, but I got an error. The error message is as follows.
“There is no version of Rectangle.ByWidthLength that accepts the argument type (string,string).”

I also thought there was a problem with the Revit sample file (I was using the 2021 version downloaded from the site), so I tried again, replacing it with the 2023 version. However, the result was the same.

Huh. OK, so that message indicates that the values coming into the rectangle node are strings (text) instead of numbers. Let’s check what those strings are. After running the graph and getting the error, can you check the value in the code block node that feeds into the rectangle in your screenshot? To do this, hover over the node, then hover over the value box that appears below the node, then click the pin icon on the value box. Then take a screenshot. When I do this I get:

image

Note the number in blue, though I suspect you’ll see something different. (It only shows the first value, but hopefully that will be enough to understand what’s going wrong).

I quickly pinned the node values and checked them. However, it looks like it says nothing.
image

I went back and checked the node a bit and found that I was only able to get Element.Id.

@s.iwasaki Ahah! I did not account for localization. Based on your screenshot I think you’re running Revit in Japanese, correct? The names of Revit element parameters are language-dependent and I’m not aware of an easy way to convert. Please try the attached - I’ve replaced English parameter names with Japanese.
matterlab_Create-sheets-for-existing-views - Japanese.dyn (325.2 KB)

Thank you very much for your support in Japanese!
As for loading the sheet, it worked well.
Thank you so much!

However, I got an error in another area. I tried using “JPN” and “ENU” languages, but the error occurred in the same place.


@s.iwasaki So sorry for the long silence. I was out, and wires got crossed on someone picking this up. I’m back now! But this is strange, as I don’t see that error. I’ve tried with both the first graph I posted, in ENU Revit, and the second translated one, in JPN Revit, and neither have a warning at that node. What is the version of Dynamo (screenshot of Dynamo → About) and Revit (Help → About - see attached image)? Thanks!
image

Sorry it took so long to reply to you as well.
I checked the Revit version.
It is as shown in the image.
image

Thank you for your cooperation.

Looks like you need to update to the latest version 2023.1.2, as this rectangle bug was resolved in that build.

1 Like

@trygve.wastvedt @aaronrumple @jacob.small
Thank you all for your courteous responses.
I was able to output the results as shown in the image.

I really appreciate it!