That could be described as CSV data (Comma Separated Values,) as yes it is a very old way of separating data.
BUT, it has a drawback, especially in SketchUp inputboxes. Euro users often use the comma as a decimal separator, so for them they’ll use the semi-colon as a value separator.
So, you’ll need to determine what the value (list) separator is, and what the decimal separator is. The API added a submodule for this in SketchUp v20616M1:
LIST_SEPARATOR = Sketchup::RegionalSettings::list_separator
# comma not used for decimal separator:
LIST_SEPARATOR = ','
# No error, so comma is used for decimal separator:
LIST_SEPARATOR = ';'
Then, use standard
String class methods to split the string and strip the results.
input = "3@3m, 4m, 5m"
# or: input = "3@3m; 4m; 5m"
spacings = 
values = input.split(LIST_SEPARATOR)
i = v.split('@')
num = i.first.strip.to_i
interval = i.last.strip.to_l
spacings << interval
spacings << v.strip.to_l
Then, with the
spacings do a loop creating or copying the geometry:
# Call a method that uses the interval:
P.S. - I have no idea in which axis the interval will do it’s work (nor what the start point is,) … this is up to you.