PDA

View Full Version : Using Ruby Scripts in the Open Data Import Centre



Ann Pugh
March 4, 2015, 06:05 PM
Why not share your ruby script examples here.
To get started here is a nice example of how to add a Unique ID to a data import of Polygons. For more details refer the blog post.

class Importer
@@polygon_id = 1

def Importer.OnEndRecordPolygon(obj)
obj['polygon_id'] = @@polygon_id

@@polygon_id += 1
end
end

rpina
March 17, 2015, 02:49 PM
I would like to know more about Ruby scripts.
Can you tell me if Ruby scripts are only applied for Open Data Import Centre, or they can be used to create scenarios with different model parameters? I would like to create several scenarios with different parameters in some orifices.