Jump to content

PCM assistance needed


Recommended Posts

I am trying to structure a file naming method utilizing the last 5 characters in a string.
If the 5 character from the right is "0" (Zero) then "Path" is something.
Else the Path is "some other path".

I understand basic If, Else, Then structure, I'm just not up to speed on Calypso formatting.

basic string:
C:\My Folder\123456_A_20_A1_0.pdf
Any help is appreciated

Edit:
I think I can test for "inspectionToleranceState() = 0" instead of reading a string.
If inspectionToleranceState() = 0 then "Use this Path" Else "Use this other Path"
Link to comment
https://qualityforum.zeiss.com/topic/10712-pcm-assistance-needed/
Share on other sites

Something like this?

string = "my string is wider than yours"

//Find the 5th character from the right. (might be the 4th or 6th as well. Play around with the bold number until you find the correct character.)

char_5 = subStr(string,len(string)-5,len(string)-5)

if char_5 == "0"
path = "C:\Something\"
else
path = "C:\Something Else\"
endif
Link to comment
https://qualityforum.zeiss.com/topic/10712-pcm-assistance-needed/#findComment-51770
Share on other sites

Thank you!

I'm thinking more on this simpler method (?).
How do I format this to work with PCM for a path to create a PDF file?
Calypso menu:
...Resources
......Name for output files
.........for this Measurement Plan
............PDF file PiWeb reporting

if inspectionToleranceState() == "0"
path = ""S:\CMM - Inspection Results & Zeiss Table Files_Vault\CMM-Inspection-PDF Files Accept\"+getRecordHead("order")+"\"+getRecordHead  ("mfgdev")+"\"+getRecordHead("u_DBSWITCH")+"_"+getRecordHead("partnbinc")+"_PiWeb.pdf""
else
path = ""S:\CMM - Inspection Results & Zeiss Table Files_Vault\CMM-Inspection-PDF Files Reject\"+getRecordHead("order")+"\"+getRecordHead  ("mfgdev")+"\"+getRecordHead("u_DBSWITCH")+"_"+getRecordHead("partnbinc")+"_PiWeb.pdf""
endif
Link to comment
https://qualityforum.zeiss.com/topic/10712-pcm-assistance-needed/#findComment-51772
Share on other sites

Define the path variable in the presettings of the measurement plan
path = ""
The following is in the postsettings
its = inspectionToleranceState()
if its == "outOfTolerance"
	path = "C:\CMM - Inspection Results & Zeiss Table Files_Vault\CMM-Inspection-PDF Files Reject\"
else
	path = "C:\CMM - Inspection Results & Zeiss Table Files_Vault\CMM-Inspection-PDF Files Accept\"
endif
The following is the path for the "Name definitions for output files for this Measurement Plan"
path + getRecordHead("order")+"\"+getRecordHead  ("mfgdev")+"\"+getRecordHead("u_DBSWITCH")+"_"+getRecordHead("partnbinc")+"_PiWeb.pdf"
Link to comment
https://qualityforum.zeiss.com/topic/10712-pcm-assistance-needed/#findComment-51774
Share on other sites

  • 3 years later...
×
×
  • Create New...