Scripting notes, 2023
All  1-2  3-5

Previous
Next
 From:  Larry Fahnoe (FAHNOE)
10932.3 In reply to 10932.1 
Hi Brian,

Re: styles

Here's how I got the style colors for later use in some debugging (I wanted colored point as well!):

code:
var debugRedStyle;
var debugGreenStyle;
var styles = moi.geometryDatabase.getObjectStyles();
for ( var i = 0; i < styles.length; i++)
{
    if ( styles.item( i).name == 'Red')
        debugRedStyle = styles.item( i).index;
    if ( styles.item( i).name == 'Green')
        debugGreenStyle = styles.item( i).index;
}


--Larry
  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:  bemfarmer
10932.4 
Thankyou Michael and Larry.

Today I managed to create and name pointD, which does not show up in the Geometry. It seems to be "everywhere", but cannot be seen on the screen.

In the objects box, selecting the name pointD shows 1.#QNAN00 X 1.#QNAN00
which I guess means "no such number" or something.
The math equation of the point coordinates must be generating a non-number...(?)

Anyway:

Mouse scroll box of any blank area of the screen indicates that pointD has been selected.

Mouse scroll box select of any other point showing on the screen, shows there to be one extra point.
Mouse point selection, of say pointA, and hiding it, gets rid of the dot on the screen. (But blank area selection there still indicates (invisible) presence of pointD.

Weird result...

- Brian
  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
10932.5 In reply to 10932.4 
Hi Brian, the 1.#QNAN00 is "not a number":
https://en.wikipedia.org/wiki/NaN

Usually it's the result of a division by zero. So probably something's not right with the calculation.

- 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-2  3-5