Rhino Custom Linewidth In Print Widths

Hello!

I was hoping someone could help me with making custom linewidth and have them appear/saved under Print Width, when choosing a linewidth, I want some specific options for the work I do, and not the standard 0.13, 0.18, 0.25 and so forth. It would be a lot more convenient for me if I didn´t have to write in the custom widths every time and I could just pick it like I can with the 0.13 and 0.18…

Thank you!

I’ve encountered the same issue. I’m building a template and manually typing the lineweights into my layers. I think this will solve the issue for myself (still need to test/experiment a little) as I’ll always (more or less) be using the same layers. Not sure if it would help with your workflow, that is, having a template with layers that have your lineweights applied to them.

The Template idea is a good solution.

Out of curiosity, why do you want different widths than these?
They come from decades old drafting standards. They are in millimeters, just like the old jewel tipped drafting pens many of us used for many years.

That´s what I´m forced to do since that´s the only solution I can figure out, but it´s not ideal. Since I need many layers, and can´t have all 0.15 lines on the same layer.

I´m not familiar with the old drafting standards, or why these were the exact widths which were chosen. I would love to learn why if there is a good reason.

I play a lot with depth in my architectural presentation drawings, (elevation, sections, plans) and I prefer different increments of width. I´m also looking to cut out third party software as much as possible, so autocad is really good for this, because of “Plot Styles”, and Adobe Illustrator is also pretty good at making drawings presentable. But the reality is, it takes to much time and effort to have a workflow between so many software’s, so In an effort to streamline everything and keep it simple but still have it look “pretty” I´m trying to get everything done in Rhino.

1 Like

This might shed some light…

2 Likes

That’s what I figured. I program AutoLISP (for AutoCAD) and I am easily able to make what I call “quick property overrides”. That is for example, I type “240” and it overrides the object’s color to 240; the beauty of having a command line is that you can simply use numbers as command name aliases. In AutoCAD I could do the same with lineweights. RhinoCommon is actually really good. I just don’t know it. I’m assuming something similar could be whipped up quite easily in Rhino.

AutoCAD again has a “chprops” command. I don’t know if Rhino has a similar command but it might… if it does you might be able to do this simply with Macro or Rhino script.

Here’s a link to a solution to a similar problem:

I know you weren’t likely looking to get into programming when you sought out a solution to this. I’m just sharing so that you have “hope” that a future solution is not far off… I’m eventually going to program something similar for myself in RhinoCommon, but simply lack the skill. If this was AutoCAD and AutoLISP it would only take me minutes… so maybe someone might come to the rescue.

A quick and dirty AutoLISP solution would involve writing a simple code, and then just copying the code and renaming the alias. For example, the script for 0.15mm override would simply be called by typing “lw15” or something like that… lw50 for 0.50mm, etc…

1 Like

This is very interesting, thank you so much. Im no coder/programmer, i know very little, but it gives me hope! Do you think RhinoCommon would hold the best solution?

And please let me know about your progress programming a solution in RhinoCommon! I wish I could code…

1 Like

As per @keithscadservices, if you want to set up a series of toolbar buttons or aliases to set specific print widths, you can take advantage of a method for accepting additional arguments when running a script. Here is the base script:

SetObjectPrintWidthHC.py (1.6 KB)

For example, you can save the above script somewhere on your hard drive, say in the usual place:

C:\Users\<username>\AppData\Roaming\McNeel\Rhinoceros\7.0\scripts

Then you can set up a series of aliases or toolbar buttons that look like this:

NoEcho ! _-RunPythonScript "FullPathToScript\SetObjectPrintWidthHC.py" 1.0

Where FullPathToScript is your path C:\Users\<username>\etc... above.

Running the script via a button or alias will set pre- or post- selected object print widths to 1.0
All you have to do for the other aliases/buttons is copy that and change the value of the last number.

The advantage is you have only one script and creating all the different value aliases or buttons you want for print widths is then very simple. Note in passing that setting the value to 0 will set the print width to “Default”, and -1 will set the print width to “No Print”. Any other negative numbers besides -1 will be interpreted as positive numbers.

All the above presupposes that you are setting object print widths by object and not by layer. It also does not work on blocks currently, that can be added later. Edit: now works on blocks. It also presupposes that you know how to make aliases/toolbar buttons…

FWIW.

2 Likes

Hello Helvetosaur, this is better than what I had hoped for, you absolute legend… Thank you so much.
Are you by any chance sitting on a stack of other quality of life scripts? Or know where I could look for more? I think I´m getting addicted to scripts.

Well, I don’t sit on them normally… :stuck_out_tongue_winking_eye: But yes, I have quite a few.

The best is to ask for specific needs/situations here… Someone will usually be able to supply or create something to help.