About Variables
Hi.
I created some variables as:
Angle_X
Angle_Y
Angle_Z
And i have a simple antenna placed at some location.
My problem is, i want change this antennas angles with using these angle variables.
For example:
when i set Angle_X = 45, the antenna immediately set its angle 45 degrees with respect to x axis.
I beliave it is in the Right Click > Properties > Workplane > U Vector and V Vector.
I think it is about cos and sin notation but i couldn't achieve what i wanted.
Thanks for your answers.
Answers
-
Hello!
The trigonometric functions take radians; did you convert the angles before using them? In other words, multiply the angles by pi/180 inside the cos and sin functions.
Let me know if that helps!
0 -
Altair Forum User said:
Hello!
The trigonometric functions take radians; did you convert the angles before using them? In other words, multiply the angles by pi/180 inside the cos and sin functions.
Let me know if that helps!
Yes.
I am getting somewhere.
Thank you sir.
Regards...
0 -
The other option (possibly easier) is to simply add a transform (rotate) on the existing part and then use your variable on the transform dialog (instead of trigonometry on the workplane tab). If done correctly, both should give the same result. What is easier depends on what you are trying to do.
0 -
JIF said:
The other option (possibly easier) is to simply add a transform (rotate) on the existing part and then use your variable on the transform dialog (instead of trigonometry on the workplane tab). If done correctly, both should give the same result. What is easier depends on what you are trying to do.
Hello JIF!
I have the same issue but I am doing it with a script file in lua. Do you know how I can change the value of the angle from a lua script?
0