I am using value lists and entering the value lists constants in manually, to make thing more flexible i would like to use the shapediver text input and referance to url with a .txt file. Cant figure out a solounion so any help will be much appreciated.
You can do something like this to select a value from a text file with all options:
Instead of the TXT file, you can have a spreadsheet with the colour values, export a CSV every update and then upload the new file to your ShapeDiver model. You can keep the visibility of the upload button off so it’s hidden your users. This is more efficient solution than loading the values via URL as this avoids connecting and downloading from your database every time the model runs.
Thanks for the response. This solves half of what im after so are making progress , i if possible would like the name that’s displayed in the drop down list imported. My work flow today is just a text file that i copy and paste into the “value list constant” container. How ever i use this same list in 15 files so is time consuming to update and is risk for error.
It’s better then to read the values via URL if you use it for other models too. I would recommend to use CSV where the first column has the names and the second the values. You can pass the names to the SDDataOutput component in your Grasshopper definition and link it with the custom dropdown on your web side. This code example shows how to generate UI elements from model parameters: