Remove Zero value dimension

Hi Everyone!

Im try to auto delete all dimensions which have zero value. But the earse tool can’t do it. I support it neet pyphon code but I don’t know it. Please someone can help me with this.
Any help will be greatly appreciated, Best regard

egards,

Here’s one possible solution:

This however won’t work for multi-span dimensions. You’ll need a custom api solution for that.

1 Like

Thank Dimitar for your attension!
But i need remove dimension in multi-span dimension. I don’t know python code and api so i hope some one will help me about this. Or if some one can break multi-span dimension to individual dimension will work too.

Hello, thanks for the post!

im also trying to remove the zero values in a multi-span dimension. has anyone an idea on this? :confused:

1 Like

Has this ever been found out? Trying to remove 0 values from my dimension line aswell.

It is straightforward with the Dimension.Properties node.


Before :

After :

Delete dimensions equal to 0.dyn (23.2 KB)

1 Like

If not solved I can help you with multisegment dimensions. Have you also arc length or other dim types?

How is this done with multiple dimensions? Seems to be creating a wrong value list?
image
Or Null values if not set on longest lacing.

The Dimension.Properties node is working as expected with the longest lacing.

What are the units of your project? Feets ? This should not be a problem since the custom node performs a conversion.

Do you also get the correct values when you use the dimension output directly from the Dimension ByReferences node?
The units of my project is in millimeters. It does seem to work when I select a dimension which I create myself, but any dimension created with Dimension ByReferences are either giving null values or negative/incorrect values for me.

Edit: It does get the correct values if I run a separate script, seems like there is a problem with it when used in the same script where the dimensions are created in.

Understood.
You probably need a Transaction.End node after the Dimension ByReferences and a Transaction.Start before the Dimension.Properties node.

1 Like

Nice one, will give it a try tomorrow and let you know!

Sorry, it took a while before getting back to Dynamo.
For some reason it looked like it was going to work but some of my references (gridlines) were being ignored when using the method you provided.
However, re-running the script ends up with null values for the “Dimension Properties” node for some reason…

EDIT: Got it to work (kinda), but my problem now is:

  • Gridline references are being ignored in the new gridlines
  • Vertical Gridlines are completely removed

Before
image

After (null values removed & Gridlines ignored)
image

And the Vertical Gridline are completely removed without any replacement, I think it’s being caused by the null values at the “list.GetItemAtIndex” node.

Alban, the node “Dimension Properties” seems to be getting null values for only vertical dimensions which are created with the “Dimension by References” node. Even when selecting those gridlines with the “select model element” node after running the script.

However, when I manually create a vertical dimension, it seems to be getting those properties without any problems. Have you tested this?

PS. It could also be because the vertical gridlines I created with “Dimension by References” use several references which are alligned behind eachother (probably the reason why I’m getting 0 values on the vertical dimensions in the first place)