Pagina's op IkLeerBIM

Posts tonen met het label Package. Alle posts tonen
Posts tonen met het label Package. Alle posts tonen

vrijdag 7 oktober 2022

Custom Dynamo Node - RoomSolidIntersectionByParameterValue

Vandaag het vervolg op mijn vorige post. In mijn vorige post vertelde ik over de node RoomsToSolidRepresentation. Het was een lange post. En vandaag gaat het over een toepassing hiervan. Dat kan gelukkig wat korter. Bij deze RoomSolidIntersectionByParameterValue

Nadat we een gesloten en betekenisvol analytisch model hebben gegenereerd van een live project -een eerste stap naar een Topological model zeg maar-, kan je beginnen met een paar analyses. Je kan bijvoorbeeld eigenschappen hangen aan de snijvlakken tussen de ruimtes. Denk concreet aan brandscheidingen en bijv. geluideisen. Dit zijn de vakjes 4.5 en 4.6 uit de BIM Basis ILS. Maar er zijn vast meer toepassingen denkbaar. ;-)

RoomSolidIntersectionByParameterValue = dit dus.

Het hele proces bestaat uit een paar stappen:
  1. Je gebruikt de Node RoomsToSolidRepresentation, en maakt zo lijsten met Solids en Rooms.
  2. Je kiest een Room parameter als sturing voor de analyse. En koppelt vervolgens de Parameter naam, de Solids en de Rooms aan de Node RoomSolidIntersectionByParameterValue
  3. Open de CSV die de Node gemaakt heeft. En vul de eisen in.
  4. Run het script nogmaals. De Node zal dan de ingevulde waardes van de CSV gebruiken en vlakken en bijbehorende waardes rapporteren
  5. Doe er wat leuks mee! Pas Revit aan: plaats DirectShapes, plaats Families, selecteer Revit objecten en pas eigenschappen aan. Of blijf nog in Dynamo en tweak het gegenereerde. Of exporteer de data, bijv. met de Topologic Package. Je kan dan in je eigen software verder. Of gebruik Rhino, Blender of ...

Laten we deze stappen eens stap voor stap nalopen en gebruiken 'het Revit huis' als referentie.

vrijdag 30 september 2022

Custom Dynamo Node - RoomsToSolidRepresentation

In mijn IkLeerBIM Dynamo Package zitten enkele Nodes waar ik het over wil hebben. Waarom heb ik ze gemaakt. Wat doen ze. En hoe werken ze. Vandaag RoomsToSolidRepresentation.




Ik ben bezig geweest om met Dynamo een sterk vereenvoudigde representatie te genereren van een gebouw. Dit moet werken in elk stadium van een lopend project. De basis van deze representatie zijn ruimtes. En daarnaast levels die als building storey zijn aangemerkt. Het resultaat is een groep volumes die compleet aaneengesloten een nieuw ‘gebouw’ volume vormen, zonder gaten. 
Zo veel mogelijk een Topologic model zeg maar.


Toepassingen zijn logischerwijs voor allerhande analyses. Hoeveelheden, Energie, daglicht, logistiek etc. Een schematische weergave is in veel gevallen zinnig omdat in een live project vaak te veel en te gedetailleerde informatie zit. Het klinkt een beetje tegenstrijdig. Maar te veel info maakt een snelle analyse vaak traag en soms zelfs onmogelijk. Ik denk dat we in de toekomst soepel heen en weer moeten kunnen van schematisch naar gedetailleerd en terug. En dit proces moet zich meerdere keren kunnen herhalen, voor zover nodig. 

In principe is het plug and play. Maar mogelijk krijg je een onverwacht resultaat bij een snelle test. Vandaar een (uitgebreide) toelichting. 😉

donderdag 22 oktober 2020

Update IkLeerBIM Dynamo Package

The IkLeerBIM Dynamo package has just been updated.

more methods, more arguments,
ready for Revit 2021,
and what about sandbox and other software.



A few things have improved or changed:
  • Some Python 'build in functions' did not show up as a method. This error is fixed.
  • The Revit API 2021 has deprecated the displayUnitType in Revit 2021. So based on the Revit version the script uses displayUnitType or ForgeTypeId.
  • The LookUp node and MethodLookUp node should also work in Dynamo Sandbox or other software. So the UnwrapElement and the loading of some libraries are made conditional.
  • The MethodLookUp node now also can deal with 'overloads'. Cases were more than 1 argument series for a method is possible in the API.
  • The Example.dyn file in the Extra directory is also updated to the new functionality.

Thanks Laurin Ernst, for the feedback!

Older posts about this Dynamo Package:

dinsdag 5 mei 2020

Update IkLeerBIM Dynamo Package

Just added 2 extra nodes: API.MethodLookUp and API.FilterScriptGenerator.
And in the extra directory is also an example.dyn file for a Quick start.


The whole goal of this Package is to help people who are already familiar with Dynamo. And understand how to make a for loop in Python. So they can find their way with the (Revit) API as comfortable as possible. You can search the internet later. Most Dynamo users will come to this point where they need to build just a little Python script because there is no Node available. Or they need to speed up a Dynamo script just a little.

To do this I needed to add 2 more Nodes:

API.FilterScriptGenerator 

Will help you with your second problem: "How to grab elements from the Revit Database?" You can use the Dynamo Nodes off course. But can you do without? Now you can. And very easy. This Node will generate a complete Python Script. Copy this to clipboard, with a Node from Clockwork or Rhythm. Paste it in a Python Node. And tweak it to your needs.

API.FilterScriptGenerator

But, "The FilterElementCollector is no rocket science." I hear you say. No it isn't.
Still this Node has almost every option that the API gives us. And there are quite a few...
Beside filtering on 1 or multiple Classes or BuiltinCategories, you can Filter on all the Parameters you want. Use Views, Levels, Geometry and DesignOptions. And there is also an option so your Python Node also works for Linked documents.

Some Filter options can be achieved in multiple ways. If that is the case I tried to choose 1 or the other. I also skipped some very specialized Filters, because it is possible to also use e.g. BuiltinCategories. Most of this is documented in the Node.
And for those who know their stuff. This is not the most beautiful, clean and efficient script I ever wrote. But it works. ;-) So perhaps I will clean it up later (if I want to).


API.MethodLookUp 

Helps to find the arguments needed for a method. In al lot of cases this will be enough. And if this is still confusing you can always use google and find more examples or an explanation.
API.MethodLookUp
With Lacing Longest and some sorting and grouping.



woensdag 15 april 2020

First release IkLeerBIM Dynamo API helper (micro) Package

While writing Python code in Dynamo I still seem to use my own LookUp Node a lot. And that is despite multiple very appreciated well known tools and websites. All these work best, because a lot of people did contribute their little something. That's how this train moves. So today I want to contribute my tiny little something.




But why do I use this LookUp Node and not something else?
First of all every situation is different. And everybody works differently. But most of the time I simply do not want to leave my scripting environment. And that is Dynamo. Secondly I want to know what actually works - no surprises. And remember I am foremost a Revit user, so the way I approach a Revit problem might be slightly different than a professional programmer. And this Node is a real easy and straight forword way of working with Python in Dynamo.

Really world changing technology right? 
Ahh not exactly... It is more like a smart dir() function, with some extra. But .. it works. Simply give the Node something to chew on. And it will return all the attributes with values, all methods, all BuiltinParameters with values, the BuiltinCategory and the Class. It is possible to search, clean or even extend the outcome with readable names. I would say, give it a try. I love it, it might work for you too.



Thanks to the community who provides countless means to examine and learn new things. Parts of the code came from everywhere. Like the Clockwork Package, Dynamo Forum, The Building Coder etc. Thanks all. This is my small contribute back.


Just a few teasers on what this node does.
And remember, this Node is basically a temporary LookUp node. It is not build to use it as a part of script. But why would you. Use it to build your own Python script. Have fun.

This node eats almost everything and shows the class of the input

Just give this node a list or a single item. It will flatten everything and uses only the first index. 

It will clean the output for empty / null etc. values. Unless you want to see everything off course. 

Sometimes you simply want readable names. But most of the times you do not...


Because it slows down a little.
And if you know what you are looking for, you simply use the Case Insensitive search.

Populaire berichten

Zoeken in deze blog