GergelyP Posted September 22, 2022 Share Posted September 22, 2022 Hey guys, So today I tried getting a point's .y position but it gives a value of 0 for some reason. In the attached picture you can see the code that I tried to run. When I use the "P" then it gives the correct vector for the position, but when I want to just get the .Y value(should be something around 1), it stopped working. Is it because I can't use the "P.y" expression in the point function? Quote Link to comment Share on other sites More sharing options...
Sepu Posted September 23, 2022 Share Posted September 23, 2022 You can do vector h = point(1, "P", @ptnum); f@height = h.y; or with opinput f@height = v@opinput1_P.y; 1 Quote Link to comment Share on other sites More sharing options...
animatrix Posted September 23, 2022 Share Posted September 23, 2022 Yes, you can't use subscript as attribute name, you have to do it after you read the proper attribute type. In this case vector, and then access the Y component. 1 Quote Link to comment Share on other sites More sharing options...
GergelyP Posted September 23, 2022 Author Share Posted September 23, 2022 Thanks for the answer. Quote Link to comment Share on other sites More sharing options...
GergelyP Posted September 23, 2022 Author Share Posted September 23, 2022 3 hours ago, Sepu said: You can do vector h = point(1, "P", @ptnum); f@height = h.y; or with opinput f@height = v@opinput1_P.y; Thank you, I figured out the first option, I was just wondering if there was a way to access it directly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.