Len X is incorrect on redraw

Len X remains incorrect after using the push pull tool inside the component and then doing a redraw. It should update on redraw I am pretty sure but for some reason it won’t. Any help appreciated.

2x lumber.skp (445.5 KB)

Not if actually change the definition’s geometry that way. Try instead scaling the instance.

Usually I do scale, sometimes I need to get inside and tweak it. It has something to do with the material scaler.

Whilst inside, I think you altered the length (lenx) so it became out of sync, used tape inside the DC measured and entered correct length then allowed resize, so should be okay now

2x lumber.skp (457.2 KB)

1 Like

I consider it a bug, and an old one at that, but if you delete the _lenx_nominal attribute from the Definition, the value should be right after a redraw.

@pcmoor is correct that it’s best not to scale a DC from within.

Save a copy of your model if you try this - no one can be certain what the results will be. That said, I’ve not had any troubles deleting any of the *_nominal attributes.

Sketchup.active_model.selection[0].definition.delete_attribute("dynamic_attributes", "_lenx_nominal")

This worked like a charm! Thanks Jim. Does this bit of Ruby affect the entire model or just the selected component? And if I wanted to delete y&z as well, just add two lines and adjust the letter? Much appreciated.

It affects only the selected component.

Technically and using the SketchUp API terminology, it removes the _lenx_nominal attribute from the AttributeDictionary named “dynamic_attributes” from the ComponentDefinition of the selected ComponentInstance.

Yes, you can replace x with y and z. But the attribute is actually recreated during the redraw only with the actual X dimension of the component. I don’t know the purpose of these nominal attributes but deleting them does fix this particular problem.

There are a couple attribute inspector extensions in the extension warehouse that will let you see all the attributes created in a DC - there is a lot more going on than it appears at first glance.