Hi immortalx,
> I'm wondering if it's possible to create those points with a specific style or object-name
> through that script, so that selecting and deleting them is easier.
Right before the call to pointfactory.commit(), put in this:
code:
pointfactory.update();
var output = pointfactory.getCreatedObjects();
output.setProperty( 'name', 'ConstructionPt' );
That should then make the generated points have an object name of 'ConstructionPt'. If you want to set a style it's a bit more involved, the property you set is the styleIndex which is an integer value of the index of the style to use. To get the style index you'd need to call:
var style = moi.geometryDatabase.findStyle( 'stylename', true /*CreateIfNotFound*/ );
var index = style.index;
- Michael
|