Trying to figure out a way to add variable information to text strings . Also being able to add more than one text string if needed.
I have a basic text string file that adds text I need to add to each Rhino file.
Say I need to add a line, “6 * 0.2 carat diamonds” in a file.
Next file i need "4 * 0.1 carat Rubies " and “6 * 0.2 carat diamonds” for example.
I could create a dictionary with gem types, dimension types (Sometimes I will use say PP3 Swarovski crystal)
Also I have to add lines for who designed the file and who did the Rhino, right now each line is one of 4 people. Could I have some sort of input and just type in the persons initial, that ould be added to the text string?
I have a basic file that uses a dictionary for metal types that I have converted some bits, it is mainly how I would structure a file, more than one dictionary?
Thanks.
I’m wondering if you run the script (data either hard-coded in the script or loaded from some .ini text file) and it runs you through a series of PropertyListBoxes with all the possible choices. PropertyListBoxes have a key/value structure like a dictionary. You could start off with all the values at 0 - ignore - and as soon as the user enters a value next to an item, it gets added to the output string. Dealing with multiple items is therefore possible.
However key/value only gives you one variable per item - looks like you might need two or three : number, size, type of gem for example… So in the end I wonder if it all shouldn’t be done with GetOption() on the command line (which will still be a box type of affair on Mac), and step through a series of screens : Gems, metals, designer, etc…
the logic of the above may be a bit complicated and it will require some RhinoCommon parts…
Alll I can think of for the moment, aside from simply filling out an Excel chart and trying to read that in from inside Rhino…