[Ri...] Posted May 6, 2025 Share Posted May 6, 2025 Has anyone found a way to pull the actuals for each axis like you can with the legacy Position? getActual("Position1").actual.x It just pulls the actual value for the Position, not from the Axis. Link to comment Share on other sites More sharing options...
[Ri...] Posted May 7, 2025 Author Share Posted May 7, 2025 I guess MyVoice is my answer. 😞 Link to comment Share on other sites More sharing options...
[Ch...] Posted May 7, 2025 Share Posted May 7, 2025 Richard, I'm able to get the PCM to report the values. Questions: did you meant to use "GDT Position1" ? Also is your Position in polar? It shouldnt matter, but just for sanity check , make sure it's in cartesian for inital test. Also - do you have 'additional report' turned on, it shouldnt matter, but could help. Good luck ! Link to comment Share on other sites More sharing options...
[Ri...] Posted May 7, 2025 Author Share Posted May 7, 2025 Please sign in to view this quote. Chris, I believe it's only reporting the actual of the Position itself, not the actual of the position. You can switch it to the Y or Z and nothing changes on the results. Link to comment Share on other sites More sharing options...
[Ch...] Posted May 7, 2025 Share Posted May 7, 2025 Richard, not sure I follow - which actual position value are you interested in ? I'll try the Y value as well... Link to comment Share on other sites More sharing options...
[Ri...] Posted May 7, 2025 Author Share Posted May 7, 2025 (edited) Please sign in to view this quote. Please sign in to view this username. , This is what I'm trying to get. It's just pulling the actual value of the Position, not the actual value from the specific axis. See below. Edited May 7, 2025 Link to comment Share on other sites More sharing options...
[Ri...] Posted May 7, 2025 Author Share Posted May 7, 2025 Please sign in to view this quote. And I apologize, my comment didn't make sense. Words are hard. Link to comment Share on other sites More sharing options...
[I...] Posted May 8, 2025 Share Posted May 8, 2025 Probably you need to adapt it: posResult="" tmp1=getActual("Position1").tableBlock.asString.asArrayOfSubstrings for n = tmp1.size to 1 step -1 tmp2=getParameterNamed(tmp1,n) if (tmp2 == "mm") or (tmp2 == "inch") then posResult=vector(getParameterNamed(tmp1,n-3).asNumber,getParameterNamed(tmp1,n-2).asNumber,getParameterNamed(tmp1,n-1).asNumber) n=0 endif next n display("x = " + posResult.x) display("y = " + posResult.y) display("z = " + posResult.z) Link to comment Share on other sites More sharing options...
[I...] Posted May 8, 2025 Share Posted May 8, 2025 oh no,, forget it, is not correct... Link to comment Share on other sites More sharing options...
[Ch...] Posted May 8, 2025 Share Posted May 8, 2025 (edited) Richard, I think I understand now. What i strange though is above you show actual.x of a Position1 and it actually shows the Y value, and actual.y shows the Z value - Im assuming those were also in 2025. Calypso didnt always behave that way correct ? You're showing GDT Position1 if you use actual.y or actual.x gives the total position result and not an individual axis result. The results I shared yesterday was in fact an individual axis result (in simulation, nominal X+Y = 0.0/0.0). I will try again with nominals not on 0.0. EDIT : Testing now and it seems you are correct actual.x, actual.y and actual.z all give the position result instead of axis results. I will do some testing. Is yours by chance in simulation or on an actual machine ?? Edited May 8, 2025 Link to comment Share on other sites More sharing options...
[Ch...] Posted May 8, 2025 Share Posted May 8, 2025 Well, there must be some way to access with PCM. I'm still learning but I managed to pull the values : GDTPOS=getActual("GDT Position1").extendedProtocol.actualCoord.asArray GDTVAL=getParameterNamed(GDTPOS).first.asString GDTX=strElement(1,"@",GDTVAL) GDTY=strElement(2,"@",GDTVAL) message("X = "+GDTX+" Y ="+GDTY) Try this in a PCM field not in result element. I couldn't quite figure how to separate the array, I think I've done it before but its not coming to me. This result is more of a string and may not work in results element. I figure Please sign in to view this username. or others will bursh up this code and figure something easier out. I'll keep trying in the meantime - but yes I would agree, getting the actual axis value in 2025 GDT positions is b0rked. 🤔 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted May 8, 2025 Author Share Posted May 8, 2025 Hi Chris, Thank you. This appears to work, but man does it make it way more complicated than what it used to be. Haha. Question - how in the world was I ever supposed to find "extendedProtocol.actualCoord" as a variable attribute?? 1 Link to comment Share on other sites More sharing options...
[Ch...] Posted May 8, 2025 Share Posted May 8, 2025 (edited) Richard, good to hear. That is the million dollar question we are all asking ,and the reason I have to dig into to the 'backroom'. I do like their new 'Intellisense autocomplete' for PCM however I think it could be improved even further with showing live actuals and more access so users can find what they need and are looking for , etc. I do think I or someone can improve on the above code to keep it as a number(Double) rather than a string, but even then Im not sure this one will work in a results element. It may work somewhere else like text element/formula, etc. Good luck. Edited May 8, 2025 Link to comment Share on other sites More sharing options...
[I...] Posted May 9, 2025 Share Posted May 9, 2025 the autocomplete needs many improvements getActual().extendedProtocol.actualCoord.x getActual().extendedProtocol.actualCoord.y getActual().extendedProtocol.actualCoord.z 1 Link to comment Share on other sites More sharing options...
[Ch...] Posted May 9, 2025 Share Posted May 9, 2025 Thanks Please sign in to view this username. , thought I tried those and they did not work for me. Link to comment Share on other sites More sharing options...
[Ri...] Posted May 9, 2025 Author Share Posted May 9, 2025 Yeah this doesn't work in 2023 at least. I'll test in later versions. Link to comment Share on other sites More sharing options...
[I...] Posted May 9, 2025 Share Posted May 9, 2025 if the result of getActual().extendedProtocol is nil then you need to activate the extended protocol and refresh the characteristic. for the other position characteristic is easier and funny: getActual().getActual.x 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted May 9, 2025 Author Share Posted May 9, 2025 Please sign in to view this quote. Not nil, but not accessible. Link to comment Share on other sites More sharing options...
[Ri...] Posted May 9, 2025 Author Share Posted May 9, 2025 This works, and what Chris posted works as well, but I'd rather not have to go the PCM/Variables route as some of these programs can have hundreds of Positions - would be a nightmare. Link to comment Share on other sites More sharing options...
[Ch...] Posted May 9, 2025 Share Posted May 9, 2025 (edited) Richard, can you also possibly try this in a PCM field, like pre/post of a feature ? Just for clarification. I know you need it in a Result Element. getActual().extendedProtocol.actualCoord.x getActual().extendedProtocol.actualCoord.y getActual().extendedProtocol.actualCoord.z Thanks, Edited May 9, 2025 Link to comment Share on other sites More sharing options...
[Ri...] Posted May 9, 2025 Author Share Posted May 9, 2025 Yeah. I can't get it to work in any version. 1 Link to comment Share on other sites More sharing options...
[Ri...] Posted August 21, 2025 Share Posted August 21, 2025 None of these examples work in v2022. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in