Here is a minimal working code, which is very inefficient, having more points increases running time considerably. Starting from a point cloud, the objective is to create a flat labelled grid at z=0, from code, with no user interaction, which can be projected on to a surface.

```
model = Sketchup.active_model
entities = model.active_entities
arr =
[[-18.m, 54.m, 33.845.m],
[-15.m, 54.m, 33.785.m],
[-18.m, 51.m, 34.015.m],
[-15.m, 51.m, 33.705.m],
[-12.m, 51.m, 33.475.m],
[-9.m, 51.m, 33.335.m],
[-6.m, 51.m, 33.345.m],
[-3.m, 51.m, 33.115.m]]
arr.each {|a|
entities.add_cpoint(Geom::Point3d.new([a[0],a[1],0]))
#
newgroup =entities.add_group
newgroup.entities.add_3d_text(a[2].to_m.to_s, TextAlignCenter, 'Liberation', true, false, 1.0, 0.0, 0, true, 0)
transformation = Geom::Transformation.rotation(ORIGIN, Y_AXIS, 0.degrees)
transformation *= Geom::Transformation.translation([a[0],a[1],0])
newgroup.transform!(transformation)
}
```