I usually export my drawings to .dwg and find annoying the fact that i can’t reprint them with the same printing colors, as they aren’t transmitted during the export. A quick workaround would consist in changing the layer colors to those set as printing colors. I’m sure thats something that it can be easily achieved in python, but I can’t figure it out, as I’m a begginer in the subject. The code structure would be something like this:
def ColorLayerAsPrint ():
myLayers=rs.LayerNames()
myPrintColors= rs.LayerPrintColor()
for obj in myLayers:
rs.LayerColor (myLayers, (myPrintColors))
ColorLayerAsPrint ()
It doesn’t work so far. What is wrong in the code? Is there an easier approach which doesn’t involve changing the layer colors? Any help provided will be useful. Thank you in advance
Rhino 6 SR35 2021-8-10 (Rhino 6, 6.35.21222.17001, Git hash:master @ 073ac7b225c67348731c6597127b9410126c3139)
License type: Educacional, build 2021-08-10
License details: Cloud Zoo. In use by: José Manuel Parrilla López-Brea ()
Windows 7 SP1 (Physical RAM: 16Gb)
Machine name: USUARIO-PC
Computer platform: DESKTOP
Standard graphics configuration.
Primary display: NVIDIA GeForce GTX 960 (NVidia) Memory: 2GB, Driver date: 9-13-2021 (M-D-Y).
> External USB display device with 4 adapter port(s)
- Windows Main Display attached to adapter port #0
Primary OpenGL: NVIDIA GeForce GTX 960/PCIe/SSE2: NVIDIA Corporation. OpenGL Ver: 4.6.0 NVIDIA 472.12
> No graphics device is being used for OpenGL
Secondary graphics devices.
Intel(R) HD Graphics 4600 (Intel) Memory: 2GB, Driver date: 3-30-2014 (M-D-Y).
> External USB display device with 3 adapter port(s)
- Secondary monitor attached to adapter port #0
OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High
Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 9-13-2021
Driver Version: 30.0.14.7212
Maximum Texture size: 16384 x 16384
Z-Buffer depth: 24 bits
Maximum Viewport size: 16384 x 16384
Total Video Memory: 2 GB