| |
example.1 [2022/05/10 10:17] – [Creating a chair] ig_jsc | example.1 [2024/04/04 08:04] (current) – external edit 127.0.0.1 |
---|
Make sure on the //Settings// page the workspace settings are set up as following: | Make sure on the //Settings// page the workspace settings are set up as following: |
{{ ::configuration_settings.png?600 |}} | {{ ::configuration_settings.png?600 |}} |
| |
| Also if switching the mode to SimpleCom make sure to click "connect". Changing the dropdown value is not enough. |
| If you are not using a contect script make also sure the "Advanced"->"Commercial context" ist set to "NoContext". |
| |
As first the **Chair** should get a property to switch the material. There for go to the //Assets/Commercial// page. For more information on this page, check its [[ig.creator:assets:commercial|Wiki]]. | As first the **Chair** should get a property to switch the material. There for go to the //Assets/Commercial// page. For more information on this page, check its [[ig.creator:assets:commercial|Wiki]]. |
The next step is to hide either //SeatBack_A// or //SeatBack_B//. For this, a new property needs to be linked to the geometries. This is done like it has been done with the material befor. Go to //Products/Commercial// and create a new commercial property. | The next step is to hide either //SeatBack_A// or //SeatBack_B//. For this, a new property needs to be linked to the geometries. This is done like it has been done with the material befor. Go to //Products/Commercial// and create a new commercial property. |
{{ ::configuration_24.png?800 |}} | {{ ::configuration_24.png?800 |}} |
| In case testing the new property inside the //Configurator// the result is: Nothing has changed. This is because the geometries itself are not connected to the created property yet. |
| |
| Go to //Products/Graphical/Structure// to link the property and the geometries. Have a close look at the table. There should be a column called //Visible//. |
| |
| Take the line with //SeatBack_A// and for the visibility write: **{ComSeatBack==='SeatBack_A'}** |
| |
| This expression is a JavaScript code snippet. |
| Each JavaScript code snippet is written between **{}**. **ComSeatBack** is the property created under //Products/Commercial//. But when using it inside the node structure is gets the prefix **Com**. **SeatBack_A** is the name of the geometry. Notice strings are written in **''** not **""** ! |
| {{ ::configuration_25.png?800 |}} |
| |
| Because //Visible// column is asking for a boolean, this line is evaluatoed as //If-statement//. Make //SeatBack_B// configuratable as well and reset the position, so it has the same position like //SeatBack_A//. Test it in the //Configurator//. |
| {{ ::configuration_26.png?400 |}} |
| |
| With this, it is possible to configure the seatback with in two differen variations. |
| |
| As an exercice, add more properties that changes a part of the chair, e.g. the seat or the legs. |
| |
| |