Dynamo Alias

sorry for the question which is perhaps trivial
but can I change the color of the dynamo entities?
example if I create a cylindrical surface in dynamo can I color it red?
I have not found any node in dynamo for alias to do this

Python is:
# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *
clr.AddReference(‘GeometryColor’)
from Modifiers import GeometryColor
geom = IN[0]
color = IN[1]
OUT = GeometryColor.ByGeometryColor(geom, color)

A GeometryColor.ByGeometryColor node would work as is too. No need to get all Python about it. :slight_smile:

Once thing to mention here, though: you can color entities in Dynamo, but this color will NOT transfer back to Alias, as in Alias, geometry doesn’t have a color attribute. Instead, in Alias the color is defined by the Layer the geometry is on.

It’s perfect, that’s what I was looking for! Thank you

I needed to be able to color objects in dyano not alias. When there are many entities it is difficult to manage them if they are all gray

I am looking for the GeometryColor.ByGeometryColor node but I cannot find it in dynamo by alias. Where is it? It does not appear in the search function

I see it? Which Alias version are you on?

2021.2

I tried but it doesn’t work

Warning: CPythonEvaluator.EvaluatePythonScript operation failed.
SyntaxError : (‘invalid character in identifier’, (’’, 4, 32, ‘clr.AddReference(‘ProtoGeometry’)\n’)

I just installed 2021.2, and I do see it in the search field:


If you still don’t see it, can you please share a screenshot of your library tree on the left, having opened “Geometry - Modifiers - Geometry Color”?

Thanks,
GG

1 Like

i found the node but i can’t get it to work

Warning: GeometryColor.BySurfaceColors expects argument type(s) (Autodesk.DesignScript.Geometry.Surface, DSCore.Color), but was called with (Autodesk.DesignScript.Geometry.NurbsSurface, Function).

The node “Color.Red” is not creating the color red, but instead extracts the red value of an existing color. As you didn’t feed any color into it, it doesn’t work. Try something like this:

1 Like