Layer color modification to dxf export

Hello,

Though I can export the geometries to the relevant layers, I would like to control the layer color, as they all appear black.

How can I achieve this?

Thank you very much!


export_dxf2.gh (20.1 KB)

You can define your attributes using “Define Objects Attributes” from Elefront or Human and plug the output in the input “ObjAttr” of the “ExportAs” component.

If you hover your mouse over the “ObjAttr” will give-you some instructions to follow.
export_dxf2.gh (16.2 KB)

1 Like

Pancake itself doesn’t have the infrastucture to achieve that. You may either:

  • Create the layer in advance in Rhino, with properties assigned, or
  • Use ObjectAttributes from Elefront or Human, pipe it to Pancake’s Export As component’s ObjAttr, instead of Layer. Pancake would respect them.
1 Like

Hi @gankeyu @Cumberland,
First of all, thank you very much for your time and effort in trying to help me solve this problem. It is much appreciated.

I tried doing what you both suggested, tweaked it a bit, and changed the object’s color rather than the layer’s color, which is better than nothing.

You can see what I mean in the attached screenshot.
I don’t want to set a Rhino file with layers, as the entire workflow should be in Grasshopper.

Thank you very much for all the help.

Can you think of other ways to change the layer’s color?

export_dxf3.gh (30.1 KB)

I got around this issue by XREFing the output into a second “host” drawing and changing the layer style there.

1 Like

Try this version:

export_dxf2.gh (17.8 KB)

1 Like

Hi,

Thank you all for the effort, much appreciated.

I ended up creating the layers on Rhino, which was not exactly what I wanted, but it does the work.

I tried implementing the provided code with no success. I guess the problem is with how I deal with the clusters (I’m a beginner in Grasshopper).

Thanks a lot