I would like to validate a dynamic component attribute field, such that it should take value between 600-900 mm.,I.e the width of the cabinet. Somewhere I read in the forum, but unable to get back.
Can someone help
where length could be current(“lenx”)*2.54 or an some other input
But the formula in the DC vanishes, when i input the value in the Component options dialog
BOX_11.skp (988.0 KB)
Of course it does. The formula goes into the LenX attribute, and it calculates its value based on what the user inputs into the A1_Width field.
referring to another thread by philip. where the lenx is the current attribute field, which validates the data and retains in the field itself. (which i am trying to emulate) (option-01)
Another option provided is referencing another attribute, ( Height) (Option 02)
Both works correctly in that skp file of the thread.
But for me the first option fails. where i am making mistake.
Current is best reserved for the inbuilt attributes, with the custom ones it returns a different value.
For custom attributes current returns the object reference, so if I had a group of attributes
=current(“val” & num) would return the one of the listed attributes based on the num if it is either 1,2 or 3 otherwise an error
I added another attribute to recieve the input. then filtered that with the conditions
BOX_11.skp (765.3 KB)
is this the field added A1_WIDTH_S?,
You are right, I used a temporary attribute first, then replaced exist
I did this morning before work then forgot what I had done before posting this afternoon.