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
  • good day,
    to your first problem:

    1.)
    You must somehow give the user a way to type in a number. This is usually achieved with a pcDMIS input command.
       C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
       Number:
    


    2.)
    you must then tell pcDMIS to run a script
    CS1        =SCRIPT/FILENAME= C:\USERS\QS\DESKTOP\TEST.BAS
                FUNCTION/Main,SHOW=YES,,
                STARTSCRIPT/
    

    (you know that you can have different functions and subs in basic, the example script calls the sub Main() in the file "Test.bas")

    3.)
    the bas file must contain a basic code that is able to read out the data from the C1 pcDMIS command.
    only then can you use the code you posted.
    after that you need more basic code to write the data back into the input command

    ->
    * the disadvantage from all this is that you have to insert the said script call into every measurement routine.
    * on the other hand definitely makeable. As I have already mentioned, write an excel macro, easy to test and many examples online.
    * the online compiler will not be of much use to you because it cannot understand the communication between Basic and pcDMIS. In Excel you can enter the pcDMIS-Basic-DLL as a reference and then it works
    * please read the pcDMIS helpfile for this: https://docs.hexagonmi.com/pcdmis/20..._Script_1.html

    * All of this is of course just a script call from pcDMIS and everything is in Basic.
    This has nothing to do with C++ or Python. Of course, then it all has to look a bit different. (maybe you can then save the scripcall)

    ########################################

    The second problem has many possible solutions:
    For example, we have a server where you log in with a ship card. I can then import the user data into the pcDMIS report using a small basic script via a provided HTML page
Reply
  • good day,
    to your first problem:

    1.)
    You must somehow give the user a way to type in a number. This is usually achieved with a pcDMIS input command.
       C1         =COMMENT/INPUT,NO,FULL SCREEN=NO,
       Number:
    


    2.)
    you must then tell pcDMIS to run a script
    CS1        =SCRIPT/FILENAME= C:\USERS\QS\DESKTOP\TEST.BAS
                FUNCTION/Main,SHOW=YES,,
                STARTSCRIPT/
    

    (you know that you can have different functions and subs in basic, the example script calls the sub Main() in the file "Test.bas")

    3.)
    the bas file must contain a basic code that is able to read out the data from the C1 pcDMIS command.
    only then can you use the code you posted.
    after that you need more basic code to write the data back into the input command

    ->
    * the disadvantage from all this is that you have to insert the said script call into every measurement routine.
    * on the other hand definitely makeable. As I have already mentioned, write an excel macro, easy to test and many examples online.
    * the online compiler will not be of much use to you because it cannot understand the communication between Basic and pcDMIS. In Excel you can enter the pcDMIS-Basic-DLL as a reference and then it works
    * please read the pcDMIS helpfile for this: https://docs.hexagonmi.com/pcdmis/20..._Script_1.html

    * All of this is of course just a script call from pcDMIS and everything is in Basic.
    This has nothing to do with C++ or Python. Of course, then it all has to look a bit different. (maybe you can then save the scripcall)

    ########################################

    The second problem has many possible solutions:
    For example, we have a server where you log in with a ship card. I can then import the user data into the pcDMIS report using a small basic script via a provided HTML page
Children
No Data