I had a problem to display SD ‘‘direct data output’’ components in the correct order.
In the grasshopper script, I have several output data components, and it’s arranged in the desired order in grasshopper from top to the bottom.
But after I embed the link and on the final interface of our website, the information showed up in a different sequence. Somehow, the output data ‘V 1.0’ always showed up in the very beginning, even though in the script, it should be the last one.
In Gh script:
On the website:
I was wondering if there is some rules for the order.
Please share your ideas!
Data outputs do not come with any information about their order, this is only available for inputs. The ShapeDiver platform does not display them so I am assuming you are talking about the way data outputs are shown on your website, which is a logic that your web developer implemented.
The only way to order the outputs would be to add some logic to your definition: either in the naming scheme (order alphabetically) or by adding an extra data ouptput which contains the list of all data outputs in the desired order. In both cases, your web developer would have to add some simple logic on the website’s side to render the ouptuts in the specified order.
Hi @mathieu1 ,
Thanks for checking it up for us.
I talked to my colleague, and we found out that the order of output data is actually related to when you add the component, which means: which component is in the front, which is in the back in grasshopper.
After we re-arrange the sequence, the final output on our website is correct.
In the previous version, I add the component ‘‘Data - V’’ as the late change. So it appeared in the first, on the top in the script.
I would be careful with this method of organizing the inputs because it is not guaranteed and could change in the future. When we start displaying data output values on the ShapeDiver platform, it is likely that we will implement an order property similar to the outputs, taking into account the vertical position of the components on the canvas. Therefore I would at least make sure that the vertical order also matches the order you expect in your application.