Behaviour when scaling DC different with mouse, or using Measurements

I’ve developed some stage rostra as Dynamic Components, starting from excellently drawn DCs on the 3D Warehouse by Rory.

I’ve adapted and to some extent redrawn them, to allow me to specify a Height (in inches).

I’d like to be able to use the Scale tool to drag the height up and down, and it partly works. When I use the mouse, and pick a point to stop the scaling on the Z axis, the model behaves itself - the top stays at the same thickness, and the sides at the same depth, and the overall height adjusts to match the picked point Zheight.

I thought it would be possible to use the Measurement box to type in either a Scale factor or a Height measurement - but when I do that, the top thickness and side height do NOT stay at their fixed values, but scale proportionately to the original height.

I’ve drawn a simplified model in a new file to explore the problem, and illustrate it - a two-box partial model of a table 36" square, with a 1" thick top, and a side 6" deep set below the top, and a guide point at ‘floor’ level at the world origin.
Hers’s the model:
Table DC example.skp (20.7 KB)

The origin of the Top and Side components are both set at the top left hand corner of the table top, so that (with the guide point) the overall DC bounding box has the LenZ attribute equal to the height of the top, and the Z position of the side is at the same height. The ScaleTool attribute for the overall component limits scaling to the Blue axis.

The table is drawn with the top at 30" high.

I’ve specified fixed thickness for the top (1") and depth for the side (6") in the component attributes:

When I scale with the mouse, the component does what I want it to: the top and side stay the same thickness, but both move down to the new picked height (half height in this example):

But if I type in either the scale fraction (0.5) or the height (15") the top and sides shrink vertically, as well as relocating.

Is there a way round this, so that I can type in a height in the Scale tool, and have the subcomponents stay at the fixed size I’ve specified?

I know I can do it with a text box input, but then visual scaling doesn’t work.

DC Scaling does not work when entering values in the Measurements box - it’s a long-standing bug. You need to force a Redraw after entering the values.

Thanks, Jim. Can I do that inside the DC, or do I need to do it externally from the DC R-click menu?

Externally from Right-click menu.

Although, I think you can set an onClick attribute to do the Redraw.

I was looking at onClick - but that needs you to find the Interact tool first, I think (I’m still very new to DCs, but have been reading what I can here and elsewhere about them).

Yes, it does, and it works.

Will explore further.

What I would like to do is to have the option to scale with mouse (which does work well enough to match one rostrum height to another) OR input a height in a text box in Component Options.

I can’t see how to use an IF statement to achieve this. If I just fix the height from the text box, scaling can’t change it.

And looking through the DC function list, I can’t see how to detect whether the Scale tool has been used to reset the height.

Maybe a check box or something equivalent in the Options - choose to Set Height by Text Box or Use Scale Tool to set height?

[A few minutes later - nope, can’t see how to do that exactly. But I can display the DC toolbar, to get two-click access to Redraw - one click in the toolbar to choose Interact tool, then a second on the component, to force the Redraw.

Pity the DC Toolbar doesn’t have Redraw as an option. Can it be added, I ask myself? Or add a shortcut for Redraw? That should be feasible…

Or maybe not. Whenever I try to assign a key to this Flyout menu choice I get either ‘You cannot use that key as a shortcut’ or ‘Shortcut Assigned - do you want to keep original or Replace?’. When I DID find a key that I could use (O for orbit, which I don’t use as I have a wheel mouse), and changed my mind, I can no longer reassign O to Orbit.

What’s going on here?]

Further experimentation, moderately productive.

I’ve added a HeightMethod dropdown list, to choose between Use textbox input for height, and Use Scale Tool.

When using Scale Tool HeightMethod, without typing anything into the Measurement box, it works as I want and expect, EXCEPT that the Table’s LenZ attribute doesn’t update if I change back to Use textbox input, and enter a different height. It stays stuck at the previously scaled height.

This just seems weird.

Is it another ‘known bug’? And whether or not it is, where might I find a list of ‘known bugs’ in DCs?

I did find a list dating back to Oct 2015 in this forum of a Wish List for DCs, including fixing some unexpected behaviours, as well as new feature requests Dynamic Components -Wish List). But it doesn’t seem to be complete.

Since you have not uploaded an updated model, I used the previous upload to create the height option,I believe this works for the first input on a scale (or measure input) whist still in the scale operation but further input changes fails as per the known bug. On the second input (amendment) you will note that the option dialog goes blank. On redraw, will update this and the values.

Whilst still having a DC selected, you can assign (window / preferences) a shortcut key (n (or spare key of your choice)) to edit/item/DC/redraw so that only need to press n to redraw

table height.skp (35.1 KB)

Thank you for pursuing this. I did sort-of get it working as I outlined in earlier post (choose between text box and scale tool), but decided it was too clumsy to be really useful. so I’ve stayed with simple text box input in my model at least for the moment.

I can’t get at my computer until later this evening or tomorrow (making this response from my phone), but will look at your model then and see how it behaves. Will also add shortcut as you suggest.

Tx again

PS. My shortcut setting problem is solved. I was pressing Enter key after typing the shortcut letter - have to click somewhere else instead of pressing Enter key which can’t be used as a shortcut. See