"Create a script to generate a PBS of the elements present in the project."

Subject: Help Needed with Dynamo Script for Selecting and Categorizing Elements

Hello everyone,
I’m facing an issue with a Dynamo script I’m working on, and I would appreciate some guidance to resolve it. The primary goal of the script is to automatically select walls and determine their respective levels, categorizing them under ‘L3’. However, I’m encountering a few challenges:

  1. Primary Issue: Creating a script that can automatically select walls and determine their corresponding level, categorizing them as ‘L3’.
  2. Secondary Challenges:
  • Identifying if a wall belongs to different lots within a project where multiple lots are present.
  • Determining the building in which a wall is located in the case of multiple buildings within a project.
  1. Generalization: I would like to make this script adaptable for use in various projects.
  2. Result Output: Ideally, I’d like the results of the script to be exported into an Excel table, which I can then utilize to generate diagrams or schematics.

Please note that while I’ve highlighted walls as an example, I intend to use this script to select all categories or families present within a project.

here i leave an image of the PBS that i need to create; i’m italian so i translated all the worlds in english

  • LIVELLO: Level
  • INTERVENTO: Project
  • LOTTO: Plot
  • Corpo di fabbrica: Building structure
  • Piano: Floor
  • Vano: Compartment
  • PI: Ground level
  • A01: A01
  • AE: External spaces
  • P0: P0 LEVEL 0
  • P1: P1 LEVEL1
  • P2: P2 LEVEL 2
  • P3: P3
  • P4: P4
  • P5: P5
  • P6: P6
  • P7: P7
  • PC: PC

Best regards to every one, maybe i can have some help just in the beginning of this script.

Samuel

What have you done so far? You should be able to work through each of these challenges/outcomes one by one as they more or less build upon each other. Getting the associated levels should be relatively easy, but it also depends on how you want to include walls that span multiple stories. Identifying the lot and/or building would also be dependent on how you’ve defined those scopes within the project itself.

Once you’ve better defined those things and shown us what your current workflow is, we can start to talk about next steps.

HI Nick, i’ve created this current script


Now i’m just using a simple model with 8 walls and with a package i was able to define the levels and the name of the walls;and now i have this questions

  • is there another way to selects element, like just by searching their name, or the only possible way is to search them by categories or by the name of the categories.
  • If i have a linked architectural project the script will work anyways or i need other nodes to create a results like this; i didn’t tried it in a liked model and i was wondering if someone new if this can works in the same way

the results were created also in an excel file

-is there a way to modify my excel file in dynamo like create titles or write something in column

thank you for yout patience

There are many different ways to collect elements, but category and family tend to be the most common. It all just depends on what you’re wanting to do.

Working with linked elements is usually the exact same process, you just have to get the elements from the linked instance first. There are many options and nodes that do this as well.

You can create whatever dataset you want and then send it to Excel.

I realize you are new to Dynamo, but these are all pretty basic questions that have been answered many times throughout the forum already. I highly recommend you work through the Dynamo Primer to get familiar with the core concepts and search through the forum to find answers to questions you might have.

Thank you nick, actually yes i’m new to dynamo, i think i just need some time to learn it; i was wondering fi you could give me external package that can be useful, because i’ve installed few of them but i think there are more that i can use to semplify the workflow, thank you for the responses.

have a great day