I need help... What cell expression should I add to get JOB NUMBER and PART NUMBER?
Thank you!
Your Products have been synced, click here to refresh
I need help... What cell expression should I add to get JOB NUMBER and PART NUMBER?
Thank you!
Oh that makes it a lot easier! If it's just you who runs the CMM, then all your information is readily available except for Job Numbers. I was thinking too big when I started helping. I'm glad you got it sorted.
I don't think you truly need to even make subroutines, but it's always good to get things to work.
It's easier for now, and you know what, every idea is valuable because you don't know when you'll need it.
Thanks!
Just for me, I find it easiest to include a script at the end of the program and pass it arguments for new values in the header. You can auto-increment, obtain them from operators, whatever works best. And that also avoids me having to change report and/or header formats.
Sub Main(SN As String, PN As String, RN As String, SC As String) Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Part.PartName = PN Part.StatsCount = SC Part.SerialNumber = SN Part.RevisionNumber = RN Part.RefreshPart Part.Save Dim Rep As Object Set Rep = Part.ReportWindow Rep.RefreshReport End Sub
You can paste this at the start of every program and modify the Part Number and Operator Number fields for yourself. When we make new routines, we do part numbers where I work.
Then manually input the Job numbers, and adjust the length value to fit your own needs.
TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Part Number ; Part Number : GETTEXT("PART_NAME") TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Operator ID ; Operator Number : Enter Number Here C1 =COMMENT/INPUT,NO,FULL SCREEN=NO, Enter Job Number IF/LEN(C1.INPUT)<>6 COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO, Job Number must be 6 characters long GOTO/C1 END_IF/ TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Job Number ; Job Number : C1.INPUT
Here is a code I was playing with today using Tracefields and flow control to control character limits, and character types in Job ID's.
TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Part Number ; Part Number : GETTEXT("PART_NAME") TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Operator ID ; Operator Number : Enter Number Here C1 =COMMENT/INPUT,NO,FULL SCREEN=NO, Enter Job Number : Example 2B99550 IF/LEN(C1.INPUT)<>7 COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO, Job Number must be 7 characters long GOTO/C1 END_IF/ ASSIGN/CHECKVALUE=RIGHT(LEFT(C1.INPUT, 2),1) IF/CHECKVALUE - CHECKVALUE >= 0 COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,OVC=NO, Numerical character not allowed in position 2 GOTO/C1 END_IF/ TRACEFIELD/DISPLAY=NO,REPORT=NO,DISPLAY MESSAGE=Verify Job Number ; Job Number : C1.INPUT
I've uploaded FILE_HEADER.LBL edits I've done if anyone needs with a full readme file that breaks down the code I used here step by step, and how to use the report labels.
If anyone truly requests for the full readme text file I've written here to be posted, I can also do that. But it is a lot and don't want to flood the comments.
Not sure if file sharing links are allowed, but here is my report label + readme
https://www.mediafire.com/file/if3vunp61bblff9/File_Header_Label.zip/file
I can't open it. It tells me to download the app. And I don't have that power to do that.
Can you include it in another form?
Drop it in its own post, then we can just flood you with comments about it!
Updated link to be in .zip format instead of .7z
My mistake on that.
https://www.mediafire.com/file/if3vunp61bblff9/File_Header_Label.zip/file
I would, but I'm leaving work in 45 mins and I won't be around. I also don't know where to share it. Cause my methods may be unorthodox.
https://nexus.hexagon.com/community/public/pc-dmis/f/pc-dmis-code-samples
Sounds like the sample of a code to me?
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |