Monthly Archives: March 2014

Recent stories in Dynamo

Hi all,

Next week I will have to post some AEC related information, but now let’s stick with Dynamo and Python code.

You will find interesting threads in the Vasari forum about Dynamo used in combination with custom nodes containing Python nodes.

Looking at my most recent definitions I tried or made, I have had success with the following:

– Get Parts parents and share parameters back and forth between

– Get host parameter and push it into the hosted family instances

– Get data from a linked file and use it in the host project (previous post)

– Create rooms by 2 different methods (see package manager)

– Get the host’s ID for analytical element

– Master the Filter by Boolean mask for lists (see picture)

Filter and compare

 

Almost a new topic each week. The thing is I’m learning great stuff here, and it often involve coding.

Remember earlier discussion about API code vs Dynamo use? I really think that’s both faces of a same medal.

My guess is there is a Before and an After. Once you get use to code with or without Dynamo, you really feel like you’re eating sugar for the very first time :).

Candy_LargeWide

Don’t take me wrong, I don’t advocate every user has to do this ,but if you think you’re acting as a BIM or Model manager or like, dive baby!

What are you waiting for? Learn to code with Harry for example, or learn Dynamo/Python. Community will surely help you. And every hour invested in lessons will bring you some Golden eggs. Just saying…..

golden-eggs

 

Python in the project: sequel 1

I got a request about getting data -aka parameters values- from instances in the linked files, in order to use those values in the current project. See how in the following images, no code needed this time.

I’ve used the definition provided in my previous post and added a few nodes.

In this case I use the Mark value of instances and push them to the instances created in the project. The Set Element Parameter node is here used as a function for each instance, meaning for each list of instances, so that all have a value.

Get Set parameter for FI

instances of links

Here you have the definition to get values from sheets and create new sheets with those.

parameter from sheet

 

 

I haven’t fully tested yet but the Get Family Instances from link looks quite generic.

Julien

 

 

Caution: Python in the project!

No joke, this post is going to deal a bit with coding, even if I’m currently not a coder at all.

I need to thank cool guys from the Vasari forum that provided in time some help to me, like Andreas Dieckmann or Michael Kirschner. Answers provided were awesome.

The story began with a question from a colleague: how can I get elements from a linked file and have them in my host project?

My first idea was to copy paste things, but things are going to update, so no way. Then the hack of using MEP categories, and copy monitor them. Hack only, I was looking for a more robust solution as the linked models are not always in-house models. So I started gathering thoughts about doing this with Dynamo…and followed this idea.
The final result is not essential, as I learned SO MUCH in doing this. Really.
Find a problem, solve it with Dynamo: best training ever.
In the video and pictures bellow, I will try to explain what I’m doing here.
The definition is available in a link at the bottom, and I have uploaded Dynamo packages for the custom nodes.
I hope you find at least interesting if not useful.

In action:

## DISCLAIMER: this is a Work In Progress, use at your own risk, and always remember I’m not a coder ##

Get linked documentThe first custom node deals with collecting linked projects. The tricky parts is that a link exists in the database as a Revit document, but also as Instances. I have had to deal with that in the Python part. Custom node is pretty simple:

Get link CN

It provides 3 lists: the linked documents (one per linked file), the names of the documents (to choose from), and the instances of links (one or more per link document).

The Python code goes like this:

Get link Python code

I’m still learning, so I don’t want to digress on this code here.  See you on the Vasari forum if needed.

The next step is to collect family instances in the linked documents.

Get family inst from link

This custom nodes allows you to choose for a document (index in the documents list), a category, and gives you the family instances for each instance of links, with the tranform for each, meaning you get the offset to apply to families so that they are at the correct place, no matter where the link instances are in the host. Move them, it updates. See video.

Custom node naked:

Get FI from link CN

and the Python code:

Get FI from link Python code

and the final part, straightforward in Dynamo: create family instances from XYZs.

create family from link

As promised, the definition file is available here, Beware of downloading the packages Get linked documents and Get family instances from Revit link to make it run properly.

I would really like having your thoughts and comments.

Julien

Excavation works = masses + Parts (again)

Hi folks, here’s a small trick I use more than often to make excavation calculation on my projects. I thought I’ve already shared this, but it appears that not (kick me if I did, short term memory loss maybe ;-)).
The workflow will be shown in a short video below, but here comes the main steps:
– get a topo from points
– approximate the topo with a mass
– copy paste the form from Edit mode into a new Generic Model, Adaptive; paste option: on the selected level
– load this GM in the project, correct location, correct plane
– make Parts out of it
– divide, join, exclude,schedule, phase, etc….

You may not agree with this, but tell me another way to do that and we’ll start a debate.

Enjoy!

Mole