Function fails only on first run

Function fails only on first run

chad_voller
Participant Participant
364 Views
0 Replies
Message 1 of 1

Function fails only on first run

chad_voller
Participant
Participant

For the life of me, I cannot figure this one out. The maxscript works, but only after it fails the first time.

It's supposed to work by aligning a helper to the opening of a hole at an arbitrary angle, like the end of a tube. You pick 3 vertices: the first is the +Y, the second is the -Y and is across the hole which completes the Y alignment, the 3rd aligns the X to the surface, and therefor aligns Z either straight out from the hole, or in, depending on which side of the Y axis you pick.

The first time you run the script in a freshly opened Max, it fails running the function drawCoords. This function labels the +Y and -Y and the line connecting the two onto the screen. The only thing I can think of is that the array it is trying to read for some reason comes up as empty? Any thoughts as to how I can solve this?

 

 

 

Edit: Solved: I never set a new variable = to the global one.

 

0 Likes
365 Views
0 Replies
Replies (0)