Onclick + set troubleshooting

I have a cabinet door I’m trying to open & close with onClick. I’ve obviously done something to screw it up. I’ve heard that I can’t use onClick on both copy “0” and other copies… so it’s not too much work to hide copy zero and just rotate the other copies, but when I have only 1 cabinet door the onclick rotation still isn’t working. Any ideas?

Using a separate attribute as an indirect reference fixes this, took liberty to use animate on second example, I think its smoother

cabinet container_debug.skp (154.5 KB)

plus when using more than one rotation, best to assign all rotations as Sketchup can alter an unassigned in its evaluation

To get the doors to work as unconnected for the animation use a further nesting and place the animation there.
In this case I altered the second example, so no need for indirect reference as only one rotation in each level
cabinet container_debug.skp (174.7 KB)

The connected behavior in the first example is that the original influences the copy, so each copy should have their own rotation

Nailed it.
I see both solutions in play. The indirect attribute reference seems to solve the issue of nothing happening onClick – which you say is result of having more than one rotation on the element (not intuitive but at least memorable!). And moving the onClick attribute down one level deeper in the nesting so it is not applied to a copied element seems to address the connected behavior problem.
If you don’t mind, what kind of work do you do that you have such a wide and deep expertise of the DC system?
Many thanks for your review.

1 Like

A carpenter for about 20 years then an estimator / designer for wood structures. As an estimator , I discovered excel and VBA script and moved from hand lists to semi-auto computer ones. Because I have good imagination but poor memory and writing skills, this helped in producing better lists without typing. I then started using AutoCAD, from 2000, this had a VBA integration, so lines on layouts became data in excel.
However with some jobs, 3D was required to show the client, AutoCAD was ■■■■ and still expensive compared to SketchUP, but no VBA, DCs was a way to form data structures. As with excel, AutoCAD, VBA… I taught myself, stumbled through, always looking for a solution, or work around, just as you figured a method of representing the doors (as you do in design, trying to make a ones or client’s ideas reality).

1 Like