It depends if the names of the meshes can be formatted so that your groups are selectable via wildcards or substrings. If so, you can use my function and choose an appropriate parameter - if not, you'll have to use arrays to list the nodes within each group and process them individually.
If you can describe the model naming tree we can be of more help.
This is the 3dscene.
In the document I have created 4 buttons. These buttons will make the first selection.
03, 04, 05, 06 will show/hide the group of seats.
03_seats, 04_seats, 05_seats, 06_seats
Then there is another group of buttons where user can choose arms, tables, and bases.
03_arms, 03_tables, 03bases
04_arms, 04_tables, 04bases
05_arms, 05_tables, 05bases
06_arms, 06_tables, 06bases
So depending on which button is selected from 03,04,05,06 then the corresponding arm, table or base will be shown/hidden.
At this point I understand that second part of the code (then getAnnots3D(this.pageNum).context3D.meshVisW("leg",true);) resolves the equation.
Now I need to figure out how to write the first part. If button_one is shown
I like to give a further step to the document making available to choose the kind of arm and the kind of table.
This group of buttons has to be able to show/hide objects depending on two buttons selected previously. The one from the number of seats and the one from the arm or table´s model.
So first part of equation gets more complicated.
Thanks a lot!
When you say "if button is shown" - so you mean 'pressed' or 'made visible'? In your first message you list the actions when the buttons are 'shown' but not the opposite.
I mean when button is 'made visible'.
I have made another group of buttons that are visible when proper button is clicked and work like a witness showing which option is selected.
"On Press" event won´t work because the same button must distinguish which number of seats are in the scene before take action. Depending on the number of seats it will show a different object .
Let´s say I click, 03 . This will make appear in the scene 3 seats.
Now I click the button, VIT, then in the scene must appear the arm that is ready for the 3 seat´s model.
The same button, VIT, will wok for the the, 4, 5, and 6 seats model. Each group of seat has each owm arm object ready and put at proper place.
Clicking VIT button,
If 03_Selection button is visible then all arms will be hidden
If 03_Selection button is visible then VIT ARMS FOR 03SEATS will be shown
If 04_Selection button is visible then all arms will be hidden
If 04_Selection button is visible then VIT ARMS FOR 04SEATS will be shown
If 05_Selection button is visible then all arms will be hidden
If 05_Selection button is visible then VIT ARMS FOR 05SEATS will be shown
If 06_Selection button is visible then all arms will be hidden
If 06_Selection button is visible then VIT ARMS FOR 06SEATS will be shown
I do hide all arms first and then I show the object that I want.
I know this is a very "primitive" way of working but I am not a programmer and this is as far as I can go.
So returning to the task. I think the second part is resolved
My question is how to write the first part.
You should be storing the various parameters (number of seats, etc.) as document-level variables which are updated when the "selection" buttons are pressed, then are checked by the other buttons when their 'on Press' action is executed, so they can perform the appropriate calls to the 3D scene. Simple add a doc-level script block which defines all your variables and gives them the default values, then read/write them in the button code. It's all pretty standard stuff, just takes a while to attach to all those buttons.
Thanks for your answer Dave, and yes, you are right, I should learn some JS programming...
It is a matter of lack of time and priorities. This is an occasional work.
I will have to go on the "primitive" way.
Just let me ask for one more question.
Actually I am using at document-level a code for show/hide one layer. LayerVis
As the document is quite complex I want to use a function to hide several layers at once.
And also another function to show several layers at once.
I know wildcards and substrings are used for fields. Can this be used for layers too?
Any help will be appreciated.