Please consult the following Blogs which all pertain to the same general subject.
- https://www.mgfx.co.za/blog/building-architectural-design/dynamo-script-door-orientation-part-1/
- https://www.mgfx.co.za/blog/building-architectural-design/revit-door-hand-facing-orientations/
One of the questions we will be asking is if the From Room and To Room points are in specific rooms. When we get the answer, we need to identify the room. Now while it is not necessary in this case, I have written scripts where one needs to open a linked file in the background and identify components uniquely. This is where the local ID of the component becomes unreliable. In cases like this, I use the Global Unique Identifier (GUID) to identify the components. The GUID is much more reliable. In other words, it is quite likely that two components in separate projects will have the same local ID, but very unlikely that they have the same GUID. I, therefore, like using the GUID’s to set up dictionaries.
It is quite easy to do. Select all the rooms, get their GUID’s and use them as the Key when setting up the dictionary.
When it is necessary to identify the component, instead of using the local ID, the GUID can now be used to identify the component. Below the error is generated because of null values in the input list, which can be ignored. The dictionary is now identifying the components with great confidence.
I have adopted this method of creating dictionaries and for any other jobs that I need identification. Why risk mistaken identity?
If you need help adopting Revit, Dynamo, and BIM in your practice, please contact Micrographics so we may be of assistance.