# Alpha-numeric detail numbering

**URL:** <https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119>\
**Category:** Revit\
**Tags:** revit, python, dynamo\
**Created:** [April 17, 2018, 1:36pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119 "2018-04-17T13:36:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 17, 2018, 1:36pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/1 "2018-04-17T13:36:46Z")

</div>

Hello!  
I’m looking to name views on sheets in alpha-numberic order based on a 6x6 grid and am super close - The script I’ve cobbled together from various videos works, but the catch for this particular task requires inverting the x-axis so theoretical detail view “1A” will be on the lower right-hand side near title block, instead of at the binding side. I’ll be upfront, I’ve got very little Dynamo skills and even less Python… but basic premises of each understood. I think the fix lies in inverting the x-axis in the Viewport Properties node python script.  
Is there some python language which can invert the 0 position (so to speak) to have the desired outcome below?  
Many thanks from a green newb!

 ![38839406-6e25f61a-41a8-11e8-83fe-d7305f6e31b5](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/e/5e249804b30f45ce4958f66d816aacd3fb231325.JPG)

let me know if it would help anyone to have the .dyn file to facilitate a solution

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 17, 2018, 5:50pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/2 "2018-04-17T17:50:35Z")

</div>

@anthony_rash_goodycl Could you upload your .dyn? Will be easier to figure out what could be modified

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 17, 2018, 6:20pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/3 "2018-04-17T18:20:10Z")

</div>

The server is calling me a ‘new user’ and won’t let me directly upload the .dyn file to the post -  
is it ok to post a link via google drive for you to download? is there another way to do so if this is not acceptable?

[https://drive.google.com/open?id=1kBi9rfe1XISeTyu6YSgY0Qj4VHQ97aac](https://drive.google.com/open?id=1kBi9rfe1XISeTyu6YSgY0Qj4VHQ97aac)

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 17, 2018, 6:42pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/4 "2018-04-17T18:42:42Z")

</div>

See image of script

 ![VP%20NODE%20HERE](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/8/a84671435aae87dbaaffd20e3bee15761669d550.jpg)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 17, 2018, 7:59pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/5 "2018-04-17T19:59:04Z")

</div>

@AW_Rash Using a file sharing service is totally acceptable! 🙂 I’m not sure if it is mentioned here but check out this post if you have not yet: [How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677)

Also when sharing an image of a graph its best to zoom in until the node labels are visible, and use the camera button on the top right of Dynamo (it will capture the whole graph even if it isn’t visible zoomed in)

Here is a post with a graph that might have some parts which would help:

> [@Detail Number by Viewport Location (Share)](https://forum.dynamobim.com/t/detail-number-by-viewport-location-share/21086):
>
> Hello all, I am sharing a script to Renumber all placed views on a sheet. My firm numbers sheets from top right to bottom left (not CAD standards A1-D6) or bottom left to top right. If you too are numbering views in this way give this script a shot and let me know how it works. If you encounter any problems or make tweaks post back so we can make the script better. I have only ran this on select few sheets so far. (I hope there are no bugs) Here are some links to other post on how t…

That graph isn’t using an alpha-numeric system, however. Maybe create a Coordinate System from the Titleblock’s location point, and mirror that on a plane created in the center of sheet. You can then transform the viewport’s location points from the old coordinate system to the new one so their x values are right to left, see the blue group in the image below:

 ![viewport%20location%20right%20to%20left](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/8/d8af11fa70bd5d0f2722039f30834897919a5c17.png)

I was missing the List.DuplicatedItemIndices node you used towards the end, and used a couple of different nodes from Rhythm for obtaining the sheet’s viewports and their location data. Let me know if it works for you!

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [April 17, 2018, 8:32pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/6 "2018-04-17T20:32:45Z")

</div>

I think this will work as well. I did not test it but I think my math works and I put it in the correct spot.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d7066eb8c41dc1aeba30400126a0d84a34e8a001.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/d/dd2147426ef33adda7787c88f6f62c3548932268.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [April 17, 2018, 8:37pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/7 "2018-04-17T20:37:00Z")

</div>

I have also recreated the script you copied about a year ago. I put a min and max in to make sure the numbers or letters were not less than 1 or greater than 6 (max number of cells). My notes are backwards for numbers and letters (just saw that).

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/6/c6af1e9b5b128ca6d61ecb88a91184da6f728cf3.jpg)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 17, 2018, 9:30pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/8 "2018-04-17T21:30:22Z")

</div>

@Steven Ah yes that logic does make sense! I tested yours on the Revit sample architectural project and maybe I had just misinterpreted your numbering standard/method

Here is with your script:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/e/8e8b81e6a33de261cd2cb59e46a2e8b74aeb2942.png)

Verse the method above:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/a/eaed015234047a6a7fb8b5ef227480f10d3aafaf.png)

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [April 17, 2018, 9:42pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/9 "2018-04-17T21:42:02Z")

</div>

Yes what you showed is the intended use of my script. I am debating the correct numbering for 2 and 3. Since I am determining the view’s location from the top right 2 and 3 come before 4 but if I were to number based on the bottom left 2 and 3 would come after 5 before 6. Easy to change BBox min or max.

Looks like my math worked as well. 😄 I did not want to run it on the project I had open but I was hoping I got it right. Thanks for the proof of concept Amy.

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 17, 2018, 9:56pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/10 "2018-04-17T21:56:28Z")

</div>

@Steven Yep it definitely works! I usually use the sample projects to test stuff like that since its all set up already. The 2 & 3 did throw me off as to how your graph would be adjusted for the alpha-numeric grid format, but the math approach you took was certainly clever and I’m sure it could conform to the alpha-numeric format. (Your firm does indeed number oddly though - however the placement of 2 and 3 would make perfect sense to me if the viewport title ran right to left)

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 17, 2018, 10:09pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/11 "2018-04-17T22:09:41Z")

</div>

Wow you guys are quick… I’ve just had the chance to read the latest posts and am testing @awilliams solution now. I’d like to also test @Steven but most likely won’t get the chance to do it tonight.  
I’ll recheck once completed. Thanks again for so much help! 😁

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [April 17, 2018, 10:11pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/12 "2018-04-17T22:11:09Z")

</div>

Mine should only take you 1 minute to check. only need to add a code block and Math.Abs to your graph.

---

<div class="post-metadata">

**Author:** ![Steven](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/steven/32/112504_2.png) [@Steven](https://forum.dynamobim.com/u/Steven)\
**Post date:** [April 17, 2018, 10:19pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/13 "2018-04-17T22:19:24Z")

</div>

> [@awilliams](#):
>
> (Your firm does indeed number oddly though - however the placement of 2 and 3 would make perfect sense to me if the viewport title ran right to left)

well…Detail sheets run right to left. floor plans, section, elevations run left to right 😅 Its an old method and no one wanted to use the stick to make everyone change over to the CAD standard. I just make the tools however they need to be made.

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 17, 2018, 10:52pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/14 "2018-04-17T22:52:39Z")

</div>

Hi All,  
I’m having some trouble with the script … it doesn’t want to work quite as expected. I changed lacing to longest at Geometry nodes which helped but there’s still some disconnect with the script… perhaps how it reads the grid. I can reupload the script if there are no immediate thoughts form anyone.  
Again, I’m a bit green so thanks for patience and for help!

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0c131a7d7fe1ba2803d43b77ff1c1cb4cb240cd5.JPG)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 17, 2018, 11:08pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/15 "2018-04-17T23:08:54Z")

</div>

Hmm those results are peculiar… are those drafting views? Do the geometry outputs from the Rhythm node Viewport.LocationData (if you swapped that one in) appear to be in the correct location?

By the logic of the graph, I’d think those detail numbers could only happen if there is something off about the viewports locations themselves 🤨 Would you upload a screenshot of the graph with the previews pinned for these nodes (Viewport.LocationData, BoundingBox.MinPoint, Geometry.Transform)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/6/e628e4a48efdaf5d6604684d8146a8a539a5773b.png)

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 18, 2018, 3:28am UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/16 "2018-04-18T03:28:48Z")

</div>

As requested, an image of the graph in it’s entirety with Viewpoint.LocationData, BBox.MinPoint and Geometry.Transform previews pinned.  
I took some time investigating other possible alternatives, such as the vector axis, grid geometries and other random testing to satiate my curiosity. The views are a mix of drafting and detail views; you suggest a possible problem with the Revit family?  
The original script i used seemed to have no problem, other than it didn’t invert the x-axis. Maybe there’s a solution where i return to that as an option?

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/e/fe203386babce68fa9a05d2754f0a32fb8cf2098.png)

---

<div class="post-metadata">

**Author:** ![AW\_Rash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/aw_rash/32/45856_2.png) [@AW\_Rash](https://forum.dynamobim.com/u/AW_Rash)\
**Post date:** [April 18, 2018, 12:43pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/17 "2018-04-18T12:43:43Z")

</div>

Hi @awilliams - I took my own advice and after a lot of messing around last night decided to eliminate a variable, that being the “views” and keeping “viewports.” I swaped Sheet.getviewportsandviews for Sheets.viewports and voula!  
Everything seems to be working smoothly now. Thanks so much for all your support @awilliams and @Steven - many thanks.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/6/664e4d3503d0f7e72f3b7fc55878e58a661c933f.JPG)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c4ecb8c566113c48564b2d5d68d9705c1576067a.JPG)

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 18, 2018, 4:01pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/18 "2018-04-18T16:01:02Z")

</div>

@AW_Rash glad you got it working! I’m really quite curious about the differing results between the Sheets.Viewports node and Sheet.GetViewportsAndViews. I’m trying to test it but can’t seem to recreate the issue.

@john_pierson any chance you’ve encountered strange results with viewports and their locations? It seems here the Rhythm nodes might have been producing incorrect results in comparison to the Hollandaise viewport nodes 🤨

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [April 18, 2018, 4:08pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/19 "2018-04-18T16:08:12Z")

</div>

@awilliams trying to catch up here. Where did the difference occur?

---

<div class="post-metadata">

**Author:** ![awilliams](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/awilliams/32/114496_2.png) [@awilliams](https://forum.dynamobim.com/u/awilliams)\
**Post date:** [April 18, 2018, 4:09pm UTC](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/20 "2018-04-18T16:09:56Z")

</div>

Sorry I should have clarified better, the image on this part of the thread shows:

> [@Alpha-numeric detail numbering](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119/14):
>
> Hi All, I’m having some trouble with the script … it doesn’t want to work quite as expected. I changed lacing to longest at Geometry nodes which helped but there’s still some disconnect with the script… perhaps how it reads the grid. I can reupload the script if there are no immediate thoughts form anyone. Again, I’m a bit green so thanks for patience and for help!

The locations appear to be off given that their detail numbers weren’t making sense, and it was resolved by switching the Rhythm nodes out back to the Hollandaise nodes

[Next page](https://forum.dynamobim.com/t/alpha-numeric-detail-numbering/21119.md?page=2)
