hexagon logo

Custom code to reduce data entry

I wasn't sure to post this in the code section as I don't have code to share.

I'm absolutely NOT a coder nor do I want to learn anything but the basics, it just isn't my thing. However, I did learn enough python to cut data entry in half with our GOM software. I'm looking to get a few data entry fields removed in pcdmis now. Not critical, just one of those small improvements to make operator life better.

I've read that pcdmis code is 'BASIC' language based, and you can export this language somewhow. Then I've read it is written in C++ by a post by Neil and my head starts spinning. Can someone share how I export pcdmis command mode stuff into BASIC language export?

I see ASSIGN in pcdmis when I do a variable yet, in BASIC a variable is defined like so:

Dim item_number as String
item_number = "S-12345"


If I drop stuff like the above into pcdmis command mode is it going to understand it? Did I read correctly that is understands BASIC language. I don't feel like dealing with pulling Python programs into the dmis.

Thanks.

Parents
  • Much appreciate to all of you for helping....Bottom line is we copy and paste a long line of jibberish that contains data we have to backspace and/or re-type in. Wears you out doing hundreds of these, and then increases errors.

    So thru a comment input I want to assign the operator's copied and pasted long azz part number, so after the copy and past pcdmis natively creates this in memory thru the ASSIGN(I can handle this):
    long_azz_num = "S-123456 (1234)-(3435)3{2}4"

    Then I want to run the below BASIC code to pull out the shortened data:
    Dim long_lot as String
    Dim short_lot as String
    Dim position as Integer
    Dim lot_num as String
    
    Dim long_azz_num as String                    ' This will eventually come from PCDMIS copied and pasted user entry
    long_azz_num = "S-123456 (1234)-(3435)3{2}4"  ' This will eventually come from PCDMIS copied and pasted user entry
    
    long_lot = long_azz_num
    
    short_lot = Left$(long_lot, 8)
    
    Print long_lot
    Print short_lot
    
    position = INSTR(1, long_lot, "{")
    If position < 1 Then
        lot_num = "1_1"
    ElseIf position >=1 Then
        lot_num = MID$(long_lot, position - 1, 1) + "_" + MID$(long_lot, position + 3, 1)
    Else
        lot_num = "0_0"
    EndIf
    
    Print lot_num
    


    The code works as seen here posted into the online compiler:


    My 2nd goal is to have an operator login for the day at 7AM and never have to type in their User ID again until they next person replaces them. Not certain how do this without pcdmis calling a serparate
    program that has this variable sitting in it to be retrieved....that's what I did in GOM's python interface.

    Thanks all.....
Reply
  • Much appreciate to all of you for helping....Bottom line is we copy and paste a long line of jibberish that contains data we have to backspace and/or re-type in. Wears you out doing hundreds of these, and then increases errors.

    So thru a comment input I want to assign the operator's copied and pasted long azz part number, so after the copy and past pcdmis natively creates this in memory thru the ASSIGN(I can handle this):
    long_azz_num = "S-123456 (1234)-(3435)3{2}4"

    Then I want to run the below BASIC code to pull out the shortened data:
    Dim long_lot as String
    Dim short_lot as String
    Dim position as Integer
    Dim lot_num as String
    
    Dim long_azz_num as String                    ' This will eventually come from PCDMIS copied and pasted user entry
    long_azz_num = "S-123456 (1234)-(3435)3{2}4"  ' This will eventually come from PCDMIS copied and pasted user entry
    
    long_lot = long_azz_num
    
    short_lot = Left$(long_lot, 8)
    
    Print long_lot
    Print short_lot
    
    position = INSTR(1, long_lot, "{")
    If position < 1 Then
        lot_num = "1_1"
    ElseIf position >=1 Then
        lot_num = MID$(long_lot, position - 1, 1) + "_" + MID$(long_lot, position + 3, 1)
    Else
        lot_num = "0_0"
    EndIf
    
    Print lot_num
    


    The code works as seen here posted into the online compiler:


    My 2nd goal is to have an operator login for the day at 7AM and never have to type in their User ID again until they next person replaces them. Not certain how do this without pcdmis calling a serparate
    program that has this variable sitting in it to be retrieved....that's what I did in GOM's python interface.

    Thanks all.....
Children
No Data