Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Function fails only on first run

0 REPLIES 0
Reply
Message 1 of 1
chad_voller
228 Views, 0 Replies

Function fails only on first run

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 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report