SlideShare a Scribd company logo
1 of 5
Download to read offline
By WOJCIECH KLEPACKI wklepa@gmail.com 
  During the coordination process in Navisworks, having a camera placed in every room would 
be one of the most welcome features. Creating the camera in Navisworks or Revit it’s an easy but 
tedious process and can take several hours to complete. There is always a good chance to miss one 
of the critical room. The good news is that it’s fairly easy to automate in Revit and Dynamo. 
  In the beginning, I did a couple of initial statements. The first one is that I’m interested in 
collecting all but redundant rooms. The second is that I want to place the camera in the room reference 
point. I would be very reluctant to place the camera in the geometrical centre of the room because it 
can be located next to the wall or another obstacle. The last statement is that I want to take the most 
distant point of the room. This distance is calculated from the reference point. Seemingly, the whole 
workflow looks simply and indeed, it’s not complicated.  
  Om the series of drawings below, I’m presenting what kind of outcome I’m looking for. This is 
an example of the camera located according to the rules I described at the beginning. 
 
  The image below shows the perspective view of the situation from the plan shown above.  
 
  I’m composing my scripts in Dynamo using the Design Script Language. It’s based on 
the Code Blocks enriched with classic nodes in places when I either used the custom or third‐party 
nodes or when I decided to leave them for code clarity. This technique has some advantages over the 
By WOJCIECH KLEPACKI wklepa@gmail.com 
classic method. It’s a matter of a good practice to plug watch nodes to monitor the outcome in the 
critical locations. 
  On the snippet below, I’m showing the overall look of the script. The script is divided into the 
logical parts, doing roughly serious of connected tasks, thereabouts. 
 
  At the beginning of the process, I’m starting to collect all the rooms in a project. The code 
below does it exactly in a beautifully simple yet effective way: 
 
  Now,  it  comes  the  time  to  clear  all  the  redundant  room,  extract  some  room  associated 
parameter values I will need later in a workflow. I’m interested in knowing are there any rooms in a 
model that not meeting the condition. Typing the condition, I mean not closed or redundant. This is 
simple operation realised by FilterByBoolMask function. Rooms in a scope are on a sublist with index 
0 of the main list. The redundant rooms are on sublist with index 1. Therefore, it’s easy to pull them 
from the recess. 
 
By WOJCIECH KLEPACKI wklepa@gmail.com 
  I’m always interested what impact my scripting decisions may have on the process. This is the 
reason I’m using the Watch node in critical places to examine the results. Take a moment to look at 
the image below. 
 
  As I mentioned, it’s very convenient to know what rooms don’t meet the criteria. 
  Now, comes the time to do the serious task. I decided to put most of the script into one Code 
Block. There is a good reason for this. When you read my explanation, you will find out that all the 
processes in the block are acting together. Every next operation is a direct and logical consequence of 
the operation(s) performed before. Writing the script this way gives an opportunity to keep the code 
clear and as compact as possible. 
  The block basically takes three inputs: rooms, room numbers and room names. Subsequently, 
it extracts the room boundaries and, this is an important step, takes only the exterior lines in the 
count. I’m doing this using GetItemAtIndex function applied on the third level of the list (@‐3<1> 
method). Afterwards, I’m pulling the start points from the listed curves and extracting room reference 
locations. The next point is a compulsory step because the node which creates the camera views needs 
bounding  boxes  to  work  correctly.  I’m  extracting  the  cardinal  points  from  room  coordinates. 
Therefore, it’s absolutely necessary to have room limits set correctly. There is a nice script in my 
collection doing this, but this is a story to tell on another occasion. Going back to the topic, have to 
connect room  location point with  all room corners to calculate  the most distant point. I have to 
perform this operation for every single room and I have to do it well. Luckily, the Dynamo does it in a 
simple  way  using  the  robust  MaximumItem  function.  Please,  pay  attention  that  MaximumItem 
function returns vector lengths. Meanwhile, I want to have a list of points finally. Now it’s a matter of 
a good workflow to compare the lists to extract only the points I mentioned in the sentence before. 
Once  the  problem  is  sorted  I  can  calculate  the  camera  eye  and  target  position.  This  is  a  trivial 
operation, the only trick is, I’m adding 1800mm to the Z coordinate value for both eye and target 
position. In case you are not happy with this value you are free to experiment once you complete your 
own script. At the end of the block, I’m remapping some values and combining room numbers with 
room names into one value. This is only because I want to identify the camera views somehow in a 
Revit project browser. The camera names will popup same manner in Navisworks once the model is 
exported. 
By WOJCIECH KLEPACKI wklepa@gmail.com 
 
  Now comes the time to let the formal job. The sequence of nodes shown below sets and crops 
the views in Revit. 
 
  I  believe  in  data  analysing;  therefore,  I  want  my  critical  data  to  be  exported  to  Excel 
spreadsheet to examine them later. 
By WOJCIECH KLEPACKI wklepa@gmail.com 
 
  The image below shows the exemplary results of the exporting process. 
 
  This concludes the lesson or speaking less formally, that’s all folks. 

More Related Content

Recently uploaded

WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2WSO2
 

Recently uploaded (20)

WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2Driving Innovation: Scania's API Revolution with WSO2
Driving Innovation: Scania's API Revolution with WSO2
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Create a camera view by room

  • 1. By WOJCIECH KLEPACKI wklepa@gmail.com    During the coordination process in Navisworks, having a camera placed in every room would  be one of the most welcome features. Creating the camera in Navisworks or Revit it’s an easy but  tedious process and can take several hours to complete. There is always a good chance to miss one  of the critical room. The good news is that it’s fairly easy to automate in Revit and Dynamo.    In the beginning, I did a couple of initial statements. The first one is that I’m interested in  collecting all but redundant rooms. The second is that I want to place the camera in the room reference  point. I would be very reluctant to place the camera in the geometrical centre of the room because it  can be located next to the wall or another obstacle. The last statement is that I want to take the most  distant point of the room. This distance is calculated from the reference point. Seemingly, the whole  workflow looks simply and indeed, it’s not complicated.     Om the series of drawings below, I’m presenting what kind of outcome I’m looking for. This is  an example of the camera located according to the rules I described at the beginning.      The image below shows the perspective view of the situation from the plan shown above.       I’m composing my scripts in Dynamo using the Design Script Language. It’s based on  the Code Blocks enriched with classic nodes in places when I either used the custom or third‐party  nodes or when I decided to leave them for code clarity. This technique has some advantages over the 
  • 2. By WOJCIECH KLEPACKI wklepa@gmail.com  classic method. It’s a matter of a good practice to plug watch nodes to monitor the outcome in the  critical locations.    On the snippet below, I’m showing the overall look of the script. The script is divided into the  logical parts, doing roughly serious of connected tasks, thereabouts.      At the beginning of the process, I’m starting to collect all the rooms in a project. The code  below does it exactly in a beautifully simple yet effective way:      Now,  it  comes  the  time  to  clear  all  the  redundant  room,  extract  some  room  associated  parameter values I will need later in a workflow. I’m interested in knowing are there any rooms in a  model that not meeting the condition. Typing the condition, I mean not closed or redundant. This is  simple operation realised by FilterByBoolMask function. Rooms in a scope are on a sublist with index  0 of the main list. The redundant rooms are on sublist with index 1. Therefore, it’s easy to pull them  from the recess.   
  • 3. By WOJCIECH KLEPACKI wklepa@gmail.com    I’m always interested what impact my scripting decisions may have on the process. This is the  reason I’m using the Watch node in critical places to examine the results. Take a moment to look at  the image below.      As I mentioned, it’s very convenient to know what rooms don’t meet the criteria.    Now, comes the time to do the serious task. I decided to put most of the script into one Code  Block. There is a good reason for this. When you read my explanation, you will find out that all the  processes in the block are acting together. Every next operation is a direct and logical consequence of  the operation(s) performed before. Writing the script this way gives an opportunity to keep the code  clear and as compact as possible.    The block basically takes three inputs: rooms, room numbers and room names. Subsequently,  it extracts the room boundaries and, this is an important step, takes only the exterior lines in the  count. I’m doing this using GetItemAtIndex function applied on the third level of the list (@‐3<1>  method). Afterwards, I’m pulling the start points from the listed curves and extracting room reference  locations. The next point is a compulsory step because the node which creates the camera views needs  bounding  boxes  to  work  correctly.  I’m  extracting  the  cardinal  points  from  room  coordinates.  Therefore, it’s absolutely necessary to have room limits set correctly. There is a nice script in my  collection doing this, but this is a story to tell on another occasion. Going back to the topic, have to  connect room  location point with  all room corners to calculate  the most distant point. I have to  perform this operation for every single room and I have to do it well. Luckily, the Dynamo does it in a  simple  way  using  the  robust  MaximumItem  function.  Please,  pay  attention  that  MaximumItem  function returns vector lengths. Meanwhile, I want to have a list of points finally. Now it’s a matter of  a good workflow to compare the lists to extract only the points I mentioned in the sentence before.  Once  the  problem  is  sorted  I  can  calculate  the  camera  eye  and  target  position.  This  is  a  trivial  operation, the only trick is, I’m adding 1800mm to the Z coordinate value for both eye and target  position. In case you are not happy with this value you are free to experiment once you complete your  own script. At the end of the block, I’m remapping some values and combining room numbers with  room names into one value. This is only because I want to identify the camera views somehow in a  Revit project browser. The camera names will popup same manner in Navisworks once the model is  exported. 
  • 4. By WOJCIECH KLEPACKI wklepa@gmail.com      Now comes the time to let the formal job. The sequence of nodes shown below sets and crops  the views in Revit.      I  believe  in  data  analysing;  therefore,  I  want  my  critical  data  to  be  exported  to  Excel  spreadsheet to examine them later. 
  • 5. By WOJCIECH KLEPACKI wklepa@gmail.com      The image below shows the exemplary results of the exporting process.      This concludes the lesson or speaking less formally, that’s all folks.