My self and a colleague have been tasked with coming up with a way of using dynamo to colour elements depending on the distance they are away from a model of a crane. We are currently in the process of coming up with ideas as to what is the best way to go about this…
The outcome would need to be a all the element are different collars depending on their distance from the crane e.g. if it was<= 20m - element would be blue, if the element was 21m to 30m the element would be red etc…
The distances would need to be variables as they would change with crane to crane…
Has anyone done anything similar? or does anyone have any ideas about the best way to produce this in dynamo?
is there away we could edit it so that the distances dont need to be uniform e.g. 0-49m red, 49.1 to 60 Blue,60.1 to 70 Green? ( collors dont mater, they are just examples!)
As Select Model Elements doesn’t seem to have an option to edit (add/remove) the selected elements, ensure that only 3D geometry that you want to select is visible in the view.
I suspect the error is due to some 2D elements being selected.
Here is a file in which you can specify the colors. But you’ll need to ensure that your list of colors is long enough. The longer the better. I’ve created a list of 10 colors in the attached sample.
Do you know what the following warning might mean?
Warning: No function called Centroid on a Autodesk.DesignScript.Geometry.Line that takes __array could be found
The value used in a range expression must be a number
List.DropItems operation failed.
Value cannot be null.
Parameter name: source
List.DropItems operation failed.
That did the trick thank you… it works great, one last thing is it posible the make the range always start at zero? the range seems to be starting at the closest element to zero rarther than zero.
Thanks for your help with this,
on a couple of occasions items that are the same distance from the crane but on different floors are coming through as different colours. do you know why this might be happening
Maybe as an addition on this topic:
What if you want to show the max. weight of an element against the max reach of a crane??
That would be an interesting thing to show.
Im using it on a tower crane so the max lifting load changes depending on the distace from the centre of the crane, but if it is possible that would be good.
Actually, the version in which elements on different floors were colored differently, had distances measured from the center of the vertical axis of the crane
The latest version has distances measured from the central vertical axis.
In any case, the maximum load bit can be accommodated. Should be quite easy, if I haven’t misunderstood the idea.