SavePointFile
All  1-8  9-13

Previous
Next
 From:  Michael Gibson
11540.9 In reply to 11540.5 
Hi probotix,

re:
> Okay, maybe I dont understand how SavePointFile works. If I create just raw points,
> it works fine. But what I want to do is find the points of a polyline or curve and
> export those points.

Yes SavePointFile will only export point objects, not "edit points".

To export those you can convert selected curve edit points to point objects by copy/paste (ctrl+c/ctrl+v).

In v5 it's also possible to access the edit points by script, that would go like this:

var numpoints = crv.numEditPoints;
for ( var i = 0; i < numpoints; i++ )
{
    var pt = crv.getEditPoint( i );
    // use pt.x, pt.y, pt.z
}

- 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
Next
 From:  probotix
11540.10 In reply to 11540.8 
Can you be more specific about how to use the dump function?
  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
Next
 From:  Michael Gibson
11540.11 In reply to 11540.10 
Hi probotix,

re:
> Can you be more specific about how to use the dump function?

Get the file MoI_v5_API_Documentation.htm from here:
https://moi3d.com/forum/index.php?webtag=MOI&msg=10857.36

That has the code for a dump function, copy the dump function into your script and then you can call dump( obj ); which will list properties of that object.

- 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
Next
 From:  probotix
11540.12 In reply to 11540.11 
Thanks Michael!

Is there a way to launch Moi from a console and print debug info from my scripts?
  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:  Michael Gibson
11540.13 In reply to 11540.12 
Hi probotix,

re:
> Is there a way to launch Moi from a console and print debug info from my scripts?

Sorry no there isn't a way to print debug info to a system console.

A script can show a dialog box message using moi.ui.alert( 'text' ); or it can also write to MoI's log using moi.log( 'text' ); .

You can show the log using:
moi.ui.createDialog( 'ShowLog.htm' );

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-8  9-13