Alternative way to enter construction line mode
All  1-3  4-5

Previous
Next
 From:  Michael Gibson
7395.4 In reply to 7395.3 
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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  immortalx
7395.5 
Thanks again Michael, this worked like a charm!
I'm amazed at how flexible MoI is in customizing the tools and the interface!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-3  4-5