Is there a way to use either an input value or the scale tool to set the Len value of a DC?
So the problem is that if you are needing to set values for attributes XYZ or LenXYZ and particularly if you need to use a formula to do that but you do not want them to be fixed.
For example: sometimes the X position needs to be defined based on user input but you still want the user to be able to move the object without it snapping back to the defined X position.
… Or be able to scale it without snapping back to the defined LenX
The answer as best as I was able to determine is that any components that need those attributes fixed should be placed as a sub component where the parent has floating values
It is also possible to make the XYZ or LenXYZ user editable by using the visible option window but you can not make it equal some other variable -for example var =5 LenX =var+2 would lock LenX to 7
But if LenX was user editable it would work as the primary parent
So for example, you want to scale a table, and after everything inside will move/scale automatically?
-You can have all your nest components to related to the Parent!LenX, no?
For example:
If I have a table that has a lenX scale handle
and also has a variable length which can be set by user
the legs are a separate component and move in relation to LenX either way
If LenX=userinputvalue
then LenX seems to be locked to that value and the scale tool will not function.
It seems like somehow lenX needs to be a floating value.
I tried here to use Current() but have not got it too work.
It looks like if the userinput value is set to blank then the scale tool will work.
This would require the user to delete the userinputvalue before scaling though.
Hmm, I’ve never tried Current() with scaling.
I have this: DC-Curtain.skp (1.7 MB)
it’s not exactly the same as your issue, but maybe bits of it will help. I used Current () to lock Z, and have options to LenX and Scaling will modify LenX as well.
i remember current being an issue for me well, I think making a new attribute for Current and another attribute to link to it worked.
I have a similar problem with my Interior Door DC.
I added the ability to flip the door side but did not realize that it locks the axis and position.
The problem here is that in order to flip the door I have to determine the current rotz and add 180 to it
Then I tried to reverse that by taking the current rotz and subtracting 180
So I made a list box that has two selections:
Flip Door?
Yes =current(“RotZ”)+180
No =current(“RotZ”)-180
But this crashes SU
if I just make RotZ =current(“RotZ”)+180 though it works
so it seems like SU does not like the formula in a list box.
The other problem with using the list box is that in order to flip in place -I need to change the X and Y positions also.
So three attributes need to be changed with one list selection.
I could for example let the user enter the rotZ value but I see no way I could flag that and make X or Y change