nput parameter and then set the named values on the second?
protected override void BeforeSolveInstance() { Param_Integer param0 = Params.Input[0] as Param_Integer; Param_Integer param1 = Params.Input[1] as Param_Integer; param1.ClearNamedValues();
GH_Structure<GH_Integer> data = param0.VolatileData as GH_Structure<GH_Integer>; if (data.IsEmpty) return; foreach (GH_Integer value in data.AllData(true)) { switch (value.Value) { case 1: param1.AddNamedValue("First option for 1", 11); param1.AddNamedValue("Second option for 1", 12); param1.AddNamedValue("Third option for 1", 13); break;
case 2: param1.AddNamedValue("First option for 2", 21); param1.AddNamedValue("Second option for 2", 22); param1.AddNamedValue("Third option for 2", 23); break;
case 3: param1.AddNamedValue("First option for 3", 31); param1.AddNamedValue("Second option for 3", 32); param1.AddNamedValue("Third option for 3", 33); break; } return; } }
--
David Rutten
david@mcneel.com…
Added by David Rutten at 1:56am on December 18, 2013
e
7. True
8. True <-- this one
9. True
10. False
11. True
12. False
13. True
14. True <-- this one
15. True
16. False
17. True
18. False
19. True
20. True <-- this one
21. True
22. False
23. True
24. False
25. True
26. True <-- this one
27. True
28. False
29. True
30. False
31. True
32. True <-- this one
33. True
Any idea how I can solve this?
Thanks!…
1#comments
But I seem to be having a problem with this closest to some value thing: values in my list are too small, up too 1 x 10^-30. The closest value I want to search for in that list is 1.25 x 10^-9
But Grasshoppers "find similar" component recognizes all of the values from the list, to be similar to 1.25 x 10^-9, because all of those values are in range from 0.1 to 1 x 10^-30.
Is there a way some kind of tolerance can be made, when it comes to recognizing a similar value?…
ap value = True
Shift List = 1 --> (B,C,D,A)
Shift List = 2 --> (C,D,A,B)
You can also use negative values.
Shift List = -1 --> (A,B,C)
Shift List = -2 --> (A,B)
and with Wrap = True
Shift List = -1 --> (D,A,B,C)
Shift List = -2 --> (C,D,A,B)
The most useful Shift List action I use is to either get rid of the first or last item in a list and sometimes both.
Shift list = -1 --> (A,B,C) Shift list = 1 --> (B,C)
In the example posted above you are creating a shift list value equal to its location along the curve. The first section = 0 doesn't get shifted, the second section gets a shift = 1, third = 2, forth = 3 and because the wrap value is set to true the fifth section gets back to 0, sixth = 1 etc etc. creating the twisting effect.
The "one more stupid question" answer is Mass Addition. You will find the component on the Math tab or you can type it into the Keyword search feature (by double clicking the canvas). This component has two outputs a total amount for each list and a partial set of results giving:
List (3,6,9,12)
{0} = 3
{1} = 3+6 = 9
{2} = 3+6+9 = 18
{3} = 3+6+9+12 = 30…
the map? For example in one list I want curves 5, 20, 21, 22, 23, 60. In another I want curves 1, 37, 40. In another maybe 70-80. And in the last, all curves that aren't specified in those three lists. Is there a way to partition the lists as such?…
fault materials...6 RAD materials are loaded1. 2. Downloading OpenStudioMasterTemplate.idf to c:\ladybug\3. Loading EP construction library4. 206 material found in c:\ladybug\OpenStudioMasterTemplate.idf5. 30 windowmaterial found in c:\ladybug\OpenStudioMasterTemplate.idf6. 284 construction found in c:\ladybug\OpenStudioMasterTemplate.idf7. Loading EP schedules...8. The ScheduleTypeLimits: Fraction is already existed in the libaray.You need to rename this ScheduleTypeLimits.9. The ScheduleTypeLimits: Temperature 7 is already existed in the libaray.You need to rename this ScheduleTypeLimits.10. 21 scheduletypelimits found in c:\ladybug\OpenStudioMasterTemplate.idf11. 1370 schedule found in c:\ladybug\OpenStudioMasterTemplate.idf12. 13. 14. Hooohooho...Flying!!Vviiiiiiizzz...…