Hidden function in DC
-
hello guys, I am new to DC, spend all day to make a kitchen cabinet, which changes in sizes length height and depth, with success,
in component option window I want the user to have a text box with the option to hide the door of the cabinet box or not
in the component attributes window I succeeded with this on the child component level (behaviors hidden), but how do I transfer this to the parent component level, so the user can choose the option in a text box in the component attribute window
has anyone already done this? and is it possible to have it in the attribute onClick also
can I combine the two?resume what I want,
when opening component options window:
the user can choose from a txt box, length, height and depth of the cabinet (this I have)
but I want an extra text box where he can choose door hidden or not
and if possible together, if he clicks on the door it disappears or reappearsthanks in advance and sorry if these questions are to simple for you guys
regards,
guy -
@probuild said:
but how do I transfer this to the parent component level, so the user can choose the option in a text box in the component attribute window
you should do it the other way.. put the choice in the parent level then pass is down to the child with =parent!(attribute)
here's a quickie example.. the parent accepts the depth & visibility then passes the info down to the respective child.
-
tx very much Jeff for your quick reply and for the effort to make an example
what about the onClick?
I encountered also a problem this morning when I opened my saved component which I made yesterday
the parent component was gone and it opened as separate components, I saved it yesterday with save as (on the right click)
what did I do wrong? -
In this case, you should File > import the model rather than File > open it. (You can also drag&drop the model from your file browser into SketchUp.)
Typically, I do all the DC work on a "working copy" of a DC. Then when it is ready to use, that is when I export the Component using the right-click Save as option.
-
@probuild said:
what about the onClick?
yeah, you can do that too using SET()
in this case, i just added an onClick behavior to the parent then entered Set("door_vis",0,1)(and if you prefer, you can use TRUE or FALSE instead of 0 and 1)
so now, in this example, the door can be hidden via the Component Options window's dropdown list OR with the onClick
Advertisement