I’m using this script, which is very useful : AutoCAD CTB to Rhino [McNeel Wiki]
It works fine, but I’m trying to enhance it for my own practice:
What I’m trying to do is to change the Layout Print Width and the Layout Print Color with the script, instead of changing the Print Width and Print Color.
This way, I would like to be able to have specific print widths according to each layout, and to be able to batch plot all my layouts without having to reload SetAcadPrintInfo for each layout.
I didn’t find the corresponding method in the RhinoScript documentation. Is there a way to achieve this?
Hello @dale,
Thank you for your answer. I checked the RhinoPython documentation, and only found methods like LayerPrintWidth and LayerPrintColor, which seems similar to what has been used in the RhinoScript I was referring to.
No problem to migrate to Python, but could you enlighten me on the right method to get/set per-layout or per-detail layer properties with Python please?
Thank you!
Rhino.Python’s rhinoscriptsyntax library is just a library of Python functions that are designed to emulate legacy RhinoScript. So it makes sense that rhinoscriptsyntax does not contain what you are looking for (either).
Note, rhinoscriptsyntax just makes calls into RhinoCommon. You can vifew the source code to rhinoscriptsyntaxhere.
To set the per-viewport layer properties, you’ll need to go to RhinoCommon directly. Here are a few methods that will be useful to you.
Hello @dale
Sorry for my late answer, I didn’t have the time to try your code sooner.
Thank you for your detailed answer, it was exactly what I was looking for!