Hello, sorry to be late,
What would you do to get this working for all kind of objects ? (especially text, surfaces which can be tagged “No Print” ?)
Thank you so much.
Hello, sorry to be late,
Sorry, I am traveling at the moment (vacation!) so I won’t be able to look at this until I get back in a couple of weeks…
quite late but - thank you very much for your help!!!
i can’t even remember on what i was working back then…
ahem… “BIG Blink of an eye”
No kidding - thanks for the reminder. I’ll have a look later on tonight.
Merci infiniment, You’re welcome, and nobody tells you that it is an obligation.
OK, try this on for size and see if it does what you want. Should now accept all object types and work with “No Print”. If you want to type in a print width value at the command line to select all “No Print” objects, use -1.
SelObjsByPrintWidth.py (2.1 KB)
Nice ! Thank you
However a little bug in the text output:
- Pick object with print width to match or key in value (-1 for “No Print”)
So I enter -1 and indeed, all NoPrint objects and texts are selected, but the log tells:
- Selected 296 objects with print width 2.0
Also nested objects in blocks are not selected but I know this can be hard, even for McNeel.
OK, that’s odd, I can’t reproduce that here… I did make a small modification to the script this morning, try re-downloading from the post above, maybe that will work better. If not, can you post a file that produces this error?
Yes, as blocks can have any number of objects with any number of print widths… What would you expect to happen if a block contains one or more items with the print width you want, but other items with a different print width - would you want it to select or not?
I’ve downloaded the update no more oddity.
I can select the block with Noprint width with your script, but once selected, if you set any other width for the block, the objects or other block composing “this” block keeps their own properties.
Here’s a quick file with simple nested blocks, I think you could have an headache diving into this.
Thank again, your script is already usefull to me
NestedBlockPrintWidthTest.3dm (176.4 KB)
Well, you may be able to select blocks containing objects of a certain print width (working on it), but you will not be able to modify them directly as you can with non-block objects -
The block instance print width is either by the layer the instance is on or is set per object; but the elements inside the block can also have their own print width (as they can have their own layer, color etc.). I’m not sure but I think the only way to modify those is by using BlockEdit… or a fairly complex script.
As far as selection goes, if you have a block with, say, 3 objects that have different print widths, and one of those is the print width you are looking for, would you want the whole block to select or not? (you can’t select objects inside a block without BlockEdit AFAIK)
Yes, absolutely, because it’s an indication of a presence that you would not have otherwise.
OK, give this one a go… With block instances (nested also), it will dive into all nested definitions and look at all the base objects’ assigned print widths - not the outer instance’s object or layer print width. If at least one of the base definition objects in a block or nested block has the desired print width, the whole block will be selected.
Also added better handling of “Default” print width (which is defined by Rhino as “0”).
Let me know how it works.
SelObjsPlusBlocksByPrintWidth.py (3.8 KB)
…really fine, thanks again.
Interesting to see how ‘NoPrint’ set to a Block object override the display, what ever the nested objects width settings, which is not the case in the other way. I understand this is more convenient for everyone. Definitely, NoPrint is not a real width I guess, just a display directive @print time
Just downloaded your script to sort out some fuzzy thicknesses on imported drawing.
Really useful, Thanks!
Is this script the way to go or has it been implemented in V6 / V7??