Wow, the engine’s really load

Another day, another challenge – we’re on a quite interesting model right now that we need to get computing in a structural analysis package. The analytical model looks like this:

Noname

It looks like a steam cooker and for the sake of the conversation let’s refer to it as a steam cooker. Challenge is that we have some walls in there that we don’t want to have in the analysis package but still we’ll want to have their weight represented as loads in the analytical model.

Turing of the analytical model for those guys – nope. They just fade away.

 

So the idea is – and stay with us here – this is ongoing – is to analyse all walls with the analytical model being turned off and get their Start-/Endpoints, calculate the load from their volume and generate a line load in the model using Dynamo.

The prototype to this looks like this:

Noname

The code in the Python:

import clr
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

dataEnteringNode = IN
startPs = IN[0].ToXyz()
endPs = IN[1].ToXyz()
force = IN[2].ToXyz()
moment = IN[3].ToXyz()
LLType = UnwrapElement(IN[4])
plane = IN[5]

TransactionManager.Instance.EnsureInTransaction(doc)
lineloads = LineLoad.Create(doc,startPs,endPs,force,moment,LLType[0],plane)
TransactionManager.Instance.TransactionTaskDone()

OUT = lineloads

And that is not my wisdom, I am referring to other brilliant minds work here.

But we got the picture, next sequel is how to replace the code block with actual values from the model – so stay tuned.

And life is good…

Advertisements

She’s unaware…

This is something that should only be tried at own risk – TRY AT OWN RISK…

Guilty like hell, I tend to edit my shared parameters that I need for special occasions in Excel with GUIDs that I create from this link.

Capture

So the Excel looks like this:

Noname.png

And – oh dear Revit – I get the following error this time:

Noname

Darn – turned out that it was this little line that created the fuzz:

Noname

Obviously – parameter type FAMILYTYPE can’t be created in a text edior… Bummer…

After leaving this one out all was OK…

Noname

And – not forget to mention – this Data-Shapes Dynamo node is just worth every penny – parameters attached to categories in a second – my left click finger is happy…

 

Capture.PNG

Link here.

And life is good…

What the hell is it this time again…

Building some fancy content in Revit 2018 utilizing OOTB Revit steel column families that got installed with Revit 2018.

Noname

Loaded a couple of types from the type catalog

Noname

A warning

Noname

Changing the column type resulted in nothing

Noname

After type change:

Noname

Tried with Revit 2017 German content – same thing – same warning – no type changes

Noname

Tried with Revit 2016 German content – now it works.

Noname

Quite honestly I cannot understand how our friends at Autodesk can get away with such a quality of content delivered with their product. Please do better.

Then life will be good…

Coco Chanel said it better than me…

Sometimes less is more – I have sinned so many times building über complex families only to watch them melt down with every service release of Revit… not gonna happen anymore – I ask for redemption.

So much fresher it is to be able to resolve a rather complex geometrical problem with a simple Dynamo – here we go:

We start with a couple of wires that were sent to yours truly modeled as individual in-place masses – here is the model:

Capture

Here are the wires we talk about:

Capture

Here comes the Dynamo script:

Capture

Part 1:

Capture

Part 2:

Capture

Result in Dynamo:

Capture

To get the geometry back into Revit as a genuine Revit geometry – here is a hint:

Capture

Life is good…

Important notice: full credit to the original model goes to bim-consult GmbH – http://www.bim-consult.eu/de/

And a very merry… and some rants..

First – foremost – seasons greetings to all the spuds out there – may 2018 bring more Dynamo coolness and all..

One strange finding to share:

We have a category in Revit called Conduit Run

Noname

And it collects nicely all conduit runs in my project

Noname

The project looks like this:

Noname

Analyzing the Conduit rund – we can get the length and the comments – no worries…

Noname

But then we also have shared parameters assigned to the Conduit Run category and we’d expect to be able to pull them with Dynamo or the Revit API respectively:

Noname

Not really:

Noname

Seems like any parameter attached to a conduit run is only readable in the members of the run but not in the run itself. Sucks.

So – coming up one of these days is how to associate the individual parts of a conduit run to the run itself – spoiler – the Comments parameter might be helpful…

Anyways, lets focus on X-Mas cookies and Eggnog and the perfect Filet Wellington – Happy Holidays and life is good…

Nietmachine – Professionelle Kwaliteit

This might be the most absurd blog title – but for lack of any better idea – that’s the title. And here is what a Nietmachine looks like (for all our non-Dutch speakers)

1347816843_nietmachines-rapid-k1-10510601

So – but That is not what we want to covey today, let’s go to Dynamo…

So there is the issue to build up a Revit topography based on a DWG:

Noname

So – the DWG is strictly 2D but has height values as text elements referenced to points.

Creative thinking – let’s get the text insert point, read the value and treat it like an integer and construct a point in space by insertpoint x/y  and  value z.

What do we need – a DWG reduced to the the text entities. And I don’t care about the slight offset of the text insert point to the nearby point (which I could take into consideration since it is a static offset vector)

Noname

Take it into Revit:

Noname

Flyshit – but the point is:

Noname

Editable text… now we take Dynamo:

Capture

What happens here – we take all text note elements, extract x/y coordinate – take the text string, convert it to a value and construct a point in space. And the slab a topo onto it.

Done:

Noname

Text to Topo – the only hurdle was to get the x/y coordinates of a text note but I found and reused some python code:

Noname

And if you don’t like to type – here:

# Importing the ‘Common Language Runtime’ library
import clr
# Adding specific references: The Revit API
clr.AddReference(‘RevitAPI’)
from Autodesk.Revit.DB import *
clr.AddReference(‘RevitNodes’)
import Revit
# Importing specific extension methods that allow us to gain
# information such as ‘Coord’ data
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
# Creating an empty list that we populate later
OUT = []
# Running a ‘for loop’ over everything inside our input list
# by Unwrapping them (Which is requried between Revit and Dynamo
# objects
for item in UnwrapElement(IN[0]):
# For our ‘for loop’ to work, we need to indent as Python is
# very particular about indentation. We simply then ‘nest’ in
# our line of code an appendation of each ‘looped’ item into
# our previously created empty list. We then ‘cast’ the data
# to a Point (Which dynamo can read)
OUT.append(item.Coord.ToPoint())
# Natively, Dynamo understands that the OUT is our output, so
# pushes this data through the node out port

Life is good…

Talent is an asset…

News of today amidst all the craze of “normal” life – Dynamo 2.0 pre-builds are out:

Capture

They come with a big disclaimer – as far as I understand not all nodes are working and the scripts will – once upgraded – not work in 1.X anymore – so it’s time to build a sandbox for testing.

Once installed you’ll get the familiar choices what to load:

Noname

Choosing 2.0.0 will display the landing screen (BTW – loading time is still kinda appalling):

Noname

Nothing new there – let’s start a new project:

Noname

New eye-candy – all packages are not being picked up but there is an Add-ons tab:

Noname

Which will bring us to an interesting menu of file types to load…

More to come…