"Dimension.SetValueOverride" warnings

Hi everyone,

I have been trying to replicate a script I found as the solution in this post. Does anyone perhaps know what’s causing these warnings?
First the “Dimension.SetValueOverride”-node said it didn’t accept null as value, changing it to “x” gave another warning. The resulting dimension overrides every segment of set dimension or nothing, depending on the value set in the code block. It should normally only override the ones under set value. Am I missing something obvious? Noobie here :innocent:

Any help is appreciated!

Hello and welcome
input values need to be a String, convert them

image

Hi Cyril,

Thanks for your reply. I’ve looked for a way to convert a list to a string, but only found this solution, but it adds trailing 0’s to the value. Is there another way to convert them?

you can try this

python code

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

OUT = [str(i).rstrip('0') if i > IN[1] else " " for i in IN[0]]
3 Likes

I now understand that I cannot simply ‘feed’ the “Dimension.SetValueOverride” an x-value. This will result in all the segmentvalues that I don’t want changed to be baked in.

So I’m actually looking for a value that makes the “Dimension.SetValueOverride” do nothing, but it doesn’t accept null :frowning:

If the end goal is to hide the text for short dimensions, it is better to do it like this

1 Like

The end goal is to hide the text of short segments of a dimension(s) whilst leaving the longer segments untouched.