[Mi...] Posted September 2, 2022 Share Posted September 2, 2022 I wrote: //Force people to slowdown and check the alignment if it's not correct for any reason. alignment_check = true correct_alignment = "StartAlignmentName(Start)" if not((getStartSetting("baseSystemRealName") == correct_alignment)) then alignment_check = confirm("Incorrect alignment, or "+chr(34)+"Current Alignment"+chr(34)+" selected!"+cr()+cr()+"The correct alignment is: "+correct_alignment+cr()+cr()+"Pressing Yes will continue with the current settings ***DANGER OF COLLISION**"+cr()+cr()+"No will cancel and allow you to correct the alignment") endif if not(alignment_check == true) then cncBreak() endif is there a PCM function that will pull the proper start alignment name? so I can replace this: correct_alignment = "StartAlignmentName(Start)" With a variable instead of typing the right alignment into each program? getStartSetting("baseSystemRealName") pull the currently selected one from the Run menu, so that's half of what I need, now I need to compare that value to the proper setting. Link to comment Share on other sites More sharing options...
[Ma...] Posted September 8, 2022 Share Posted September 8, 2022 If you haven't re-named your alignment system manually it should be the same as name of the program and you can try this: correct_alignment = getRecordHead("planid") + "(Start)" So if your inspection plan is called MyPart_01 above line returns MyPart_01(Start) Link to comment Share on other sites More sharing options...
[Mi...] Posted September 8, 2022 Author Share Posted September 8, 2022 Please sign in to view this quote. They are renamed manually as the Start Alignments are shared among programs, so I need a way to pull the actual one that I define in the Base/Start Alignment window. Link to comment Share on other sites More sharing options...
[Er...] Posted September 9, 2022 Share Posted September 9, 2022 if baseSystem().machine.inspection.hasStartSystem correct_alignment = baseSystem().machine.inspection.startSystemTaskAndElement.value.defBaseSystem.nameOfBaseSystem if getStartSetting("baseSystemRealName") <> correct_alignment if not(confirm(getStartSetting("baseSystemRealName")+" selected!"+cr()+cr()+"The correct alignment is: "+correct_alignment+cr()+cr()+"Pressing Yes will continue with the current settings ***DANGER OF COLLISION**"+cr()+cr()+"No will cancel and allow you to correct the alignment")) endInspection() endif endif endif Link to comment Share on other sites More sharing options...
[Mi...] Posted September 9, 2022 Author Share Posted September 9, 2022 Please sign in to view this quote. How in the hell do you find all this? Once again, thank you very much. 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