Sub assembly Composer Switch to All

Sub assembly Composer Switch to All

CharlieGreene7827
Advocate Advocate
976 Views
2 Replies
Message 1 of 3

Sub assembly Composer Switch to All

CharlieGreene7827
Advocate
Advocate

I want to create a switch in sub assembly composer, that has multiple choices , that is not the problem I also would like to be to  switch to All or even a combination of any, will the swich in sub assembly composer do that and if so what is the formular

0 Likes
977 Views
2 Replies
Replies (2)
Message 2 of 3

ecfernandez
Mentor
Mentor

Hi @CharlieGreene7827. I hope you're doing fine. A switch as in any programing language is a multiway branch logic method that allows you to have different outputs (in SAC 9 outputs, and one of them would be the default case). However, you can combine switches so that when a certain condition becomes true, the switch will choose the logic branch controlled by that case and perform an action. It is there where you can place another switch to amplify the possibilities, but the cases must be created and controlled by you. I mean, if as you mentioned, you need a case in which all the cases get activated, then you'll need to create a case for that situation, and it will be controlled by a switch logic branch.

In the following image, I post a combination of switches. In the case "simple" it places a point in the origin, but if the case is "combined" it switches to the other switch to evaluate if it is either combined1 or combined2 to perform a very different action in each case.

ecfernandez_1-1655384830997.png

I hope this helps. Best regards!

 

Camilo Fernández

P.Eng | Transportation

EESignature

LinkedIn
0 Likes
Message 3 of 3

RonaldBrañez
Advocate
Advocate

Hello @CharlieGreene7827

With switch you can change the geometry based on a condition taken from the input parameters, this parameter can be previously defined through the define enumeration (it will enable a new type of input/output parameter) or through a string input parameter.

I'll explain the first option.

 

1. View tab -> Define Enumeration

2. Create a group in the list on the left, and selected the group add items (they will be the options for the exchange) in the table on the right.

3. Once you finish the definition, accept and close the dialog box.

4. In the Input/output parameters tab, create a new parameter, and in the type column, select the name of the group created in step 2. In the default value column, you will have a dropdown list with the assigned items.

5. Insert the switch, select it and in expression assign the name of the input parameter followed by the API function "Value" (GroupName.Value).

6. Create the necessary geometry. And from the switch stretch the flow arrow to the geometry.

7. Selecting an arrow that starts from switch in the properties, deselect IsDefaultCase and in the Case row assign the name of an element from the list.

8. Repeat steps 6 and 7 for all cases.

I attach a simple example.

 

Regards.

0 Likes