Changing Line Weight

Hello all,

Does anyone know of a way to read an objects line weight and then change it?

My firm has tasked me with making our elevations look nicer (as I am sure many of yours have as well). Everything (close and far) looks the same. My goal is read the current line weight and then lower it as the objects move towards the back. I have spent the last couple of hours looking for something but have not found it yet. The closest I have found is this post by John Pierson (sixtysecondrevit). I would probably use the color changing node as well but line weight is more important at this time.


Thanks for any and all input,

Hi Steven,

Did you try looking into “Element.OverrideProjectionLineWeight” node from Rhythm Pacakge.


Thanks for your reply. I have now looked into this node. It somewhat does what I need. It will take a list of elements but will only take one number. I will need to feed it a list of numbers for varying weights.

I am also looking for a way to read the current line weights so my changes will be based off the original line weight.


If you have any ideas that would be great but if not I will keep searching.

I looked into this as well, recently, and settled on “grey washing” items using a modified version of Element.ProjectionLineColor (on my phone so I may have the wrong name there) instead of overriding lineweights.

My attempts to query line weights for an object came up empty, which while disappointing we felt the grey wash was more versatile anyway. Any revolt user can update a view template and modify all lineweights in the project across the board, without having to run the Dynamo script after each change. Each time scale, object style, view template, or a new category were added the script would have to be re-run.

That at said if anyone comes up with a good solution for querying object lineweights I’d love to give it another try.


Thank you for your reply. I would actually agree grey washing would be a better way to go and have changed my scrip accordingly. I did run into the same problem with the Line Color node; however was able to solve it by having a node for each grey scale. Only 4 shades so not a problem. Would still be nice to be able to run lists into these nodes though.


Thanks for you suggestion,


I’m currently looking into changing the node to allow it to handle lists or a single value. (Via longest lacing) I will post updates as they are available.

These nodes require Python which I am not very knowledgeable in at this time.


1 Like


Thanks for looking at it. I have never coded before but spent 2 days trying to figure out how to fix it with no luck. So I know how you feel.


You can skip revising the node if you use it together with “List.Combine” like so:







This way each element will get a unique weight

1 Like

Dimitar, you are my hero! Nice work!

1 Like

Steve and John,

Too bad about no one knowing how to call an element’s line weight. That would definitely help us push the graphics along for us all really quick.

Steve, how are you deciding how to apply the various shades of grey?

My current method divides the view depth into sections, filtering the list of elements into separate lists based on which section their location falls in, and applies an override accordingly. The stuff further back gets a light grey, the stuff in the middle a darker grey, and the stuff in the front no override.

This meets my needs for now, but I’m not satisfied with it yet. Specifically there are two big disadvantages I’m trying to address:

  1. When a line or sketch based element crosses from the foreground to the background it has a location that falls in the middle somewhere, so it is overridden to the setting given to the section it lands within. Adjusting my list management to take the lesser value based on the distance from the view plane will fix this, but that will take some time for me to rework things as i'm currently using the centroid or average point, not the nearest part of the element.
  2. Views which have a large distance between elements don't always tone the way I'd like. That is if we have a list of 0', 25', and 100' the first and second items fall in the first third and receive no override, but the last item goes full grey fade on me. I've modified the script to use a % and assigned a grey value accordingly, but as noted above the element.override nodes only allow for a single value.
Sadly, I'm guessing that I am less of a python wizard than John, and know that I'm years behind many other individuals who frequent this forum. In any case, I will be attempting to overcome my ignorance Sunday, and if by some miracle I manage to pull it off I'll be sure to post the python code here for everyone's benefit.


Not Dynamo, but this could be of some help.


Dimitar you are a genius. I would have never thought of that. The list combine node does way more than I would have ever thought it could do. I going to start playing around with this.


Jacob I will do a post soon on what I am doing. Almost there I hope.

Jacob I just posted my script to the forum. You can follow this link it you want to see what I have done.

I have a conflict when I use Rhythm Package that I didn’t find “Element.OverrideProjectionLineWeight” in Rhythm Package how I can find it Please.

It was removed from the package a long time ago. There are OOTB options now. Start a new topic explaining what you are trying to achieve and provide any relevant screenshots, or files.