Converter for GETTEXT() Xact data values to new GeoTol (2020 R2)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converter for GETTEXT() Xact data values to new GeoTol (2020 R2)

    An external converter for the hassle of converting all your programs using GETTEXT() to grab data from XactMeasure evaluations to the new GeoTol evaluations.

    Credits:
    Original converter script - neil.challinor
    VB.Net adaptation - vpt.se
    Debugging and extra features - JacobCheverie

    This utility was developed to assist PC-DMIS users during the transition to PC-DMIS 2020 R2.
    2020 R2 introduced the Geometric Tolerance command, which is not compatible with the GETTEXT() command.
    This utility will convert a program's GETTEXT() commands into commands that are compatible with 2020 R2.

    Directions for use:
    - Open PC-DMIS (PC-DMIS must be running during the conversion).
    - Choose the directory containing the program(s) requiring conversion.
    - Choose from the two checkbox options:

    1. 'Overwrite?' - This checkbox, if selected, will allow the
    application to overwrite your program after conversion.
    You should only select this option if you are not planning on
    running a version of PC-DMIS older than 2020 R2.

    2. 'Invisible Mode' - This checkbox, if selected, will allow
    PC-DMIS to perform the conversion process in invisible
    mode. You will not see the PC-DMIS window as it cycles
    through your programs. This method is faster.

    - Press the 'Go!' button.
    The converter will search the folder you selected and subfolders for all .PRG's.
    It will list the programs found in the textbox and also display how many programs that were found.

    In order to not get blamed for providing infected files, the source does not contain DLL's or EXE's.
    To compile, just drop your version of the Interop.PCDLRN.dll in the bin/Release or bin/Debug folder and compile.
    The dll can be found in your PC-DMIS install folder.

    As always, try it out on copies of your part programs first!

    PCDGetTextReplace_src.zip - Source VB.NET

    PCDGT.zip - compiled binary with dll

    Originally posted by Virustotal
    6b568f8532e921d835bf284b77e93bfaaa847912c6dabb5af6 4ca2917207c1d8
    PCDGetTextReplace.exe

    MD5
    a3d3c23dc1cb80495a857ae20ef2385a
    SHA-1
    5532b1f08d108a6a2ba29439e17700470e37fd6e
    SHA-256
    6b568f8532e921d835bf284b77e93bfaaa847912c6dabb5af6 4ca2917207c1d8
    Vhash
    264036651511b0732b2d4260
    Authentihash
    6665881142a4aaa70351c87107b3cd74860bfcecf01f4163cc c7a78d62113dfc
    Imphash
    f34d5f2d4577ed6d9ceec516c1f5a744
    SSDEEP
    768:1ILm5x7mCDTtkSx4FHDP1Wdv6cL2Q3ZimvtfLarLt3SmOV/ilUAlDyFw8CqyVoIy:1IWSSfgTo9lYmxUh3SmO9cl9Vvqbbf
    TLSH
    T151536C037724BFA2CD6DC735163F519385B5EC581729EB69 78CAD0464CA8AC00EBB7B2
    File type
    Win32 EXE
    Magic
    PE32 executable for MS Windows (GUI) Intel 80386 Mono/.Net assembly
    File size
    64.50 KB (66048 bytes)
    PEiD packer
    .NET executable
    Originally posted by Virustotal
    0370cdcb927ee87674f34701e56c1f0f081acffb00a8822243 a61c60299087d6
    Interop.PCDLRN.dll

    MD5
    47579acf8923e4460a04e8a062d967ae
    SHA-1
    ede640a22f045218d106fcab180a6d7d19787e8e
    SHA-256
    0370cdcb927ee87674f34701e56c1f0f081acffb00a8822243 a61c60299087d6
    Vhash
    335036551515002affff1c1c10
    Authentihash
    bb4daaf6750740a7a8a55f59437dc037763f0c882f9cab6f06 03aca6fa6b1fb4
    Imphash
    dae02f32a21e03ce65412f6e56942daa
    SSDEEP
    12288:q9OXo5ijs12PwR+uxnc9aWNIPSJEbelQXahE3x6pwtuw C7v5zqky/Ii1/s:q9OXo5ijs12PwR+uxnc9aWNIPSJEbelf
    File type
    Win32 DLL
    Magic
    PE32 executable for MS Windows (DLL) (console) Intel 80386 32-bit Mono/.Net assembly
    File size
    388.00 KB (397312 bytes)
    PEiD packer
    .NET executable
    Attached Files
    Last edited by vpt.se; 10-15-2020, 02:21 AM.
    PC-DMIS CAD++ 2o19 R1 SP11

  • #2
    Small bug - If one or more programs are open in PC-DMIS, there is a window that will appear when attempting to start the conversion that will tell you to close all open programs. If Invisible Mode was selected before pressing ‘Go!’, the alert window will appear and then PC-DMIS will go invisible. It will not return.

    To make PC-DMIS reappear, uncheck Invisible Mode and press ‘Go!’ again. You will get the same alert and then PC-DMIS will reappear.

    To fix, the code for the Invisible Mode checkbox must be moved below the code for the alert window.

    This one was my fault, sorry about that.

    Comment


    • #3
      Thanks, JacobCheverie . Source/binaries updated, compiled and post updated.
      PC-DMIS CAD++ 2o19 R1 SP11

      Comment


      • #4
        vpt.se
        JacobCheverie
        neil.challinor

        I am trying to make this work by running the PCDGetTextReplace.exe program, but I am getting a Microsoft .NET Framework error that it cannot create the ActiveX component. Any thoughts? How do I run the other vb zip program?

        Comment


        • #5
          I wonder if it is related to the interop .dll. What is the error that you are receiving? Do you have visual studio installed?

          Comment


          • #6
            Originally posted by JacobCheverie View Post
            I wonder if it is related to the interop .dll. What is the error that you are receiving? Do you have visual studio installed?
            Visual Studio was the issue.

            neil.challinor You helped me in Tech Preview because my GETTEXT string commands have a customized syntax for importing into our ERP system. Is there a way this can work with the BAS you sent me via email back a few months ago?

            Comment


            • neil.challinor
              neil.challinor commented
              Editing a comment
              It is basically the same thing. vpt.se took the .bas code that I sent you and adapted it to vb.net before adding his own code to open & close the routines. In theory, if you had his source code you could maybe adapt it to the cypress enable scripting language that PC-Dmis scripting uses and run everything inside of PC_Dmis but it would depend on what functions he's used. A lot of the newer functions / commands in vb.net are not supported by the cypress enable scripting language - keep in mind it is over 30 years old.

            • vpt.se
              vpt.se commented
              Editing a comment
              Time to move to something else than Cypress Enable... ;P
              But keep it for compatability.

          • #7
            neil.challinor
            vpt.se
            JacobCheverie

            I am not skilled at VB. Is there a way I can take the script Neil sent me and integrate it into this program? PM me if you need the script.

            Comment


            • #8
              Make the script available, maybe it doesn't differ too much from what neil.challinor already posted.
              PC-DMIS CAD++ 2o19 R1 SP11

              Comment


              • #9
                Originally posted by vpt.se View Post
                Make the script available, maybe it doesn't differ too much from what neil.challinor already posted.
                There you go!
                Attached Files

                Comment


                • #10
                  The only difference I can find is the addition of "DPTR" for the 662, 688 and 328 command types? Maybe neil.challinor can confirm?
                  PC-DMIS CAD++ 2o19 R1 SP11

                  Comment


                  • neil.challinor
                    neil.challinor commented
                    Editing a comment
                    My memory's a little fuzzy as it's a while since I worked on this but from what I remember I had to use a pointer rather than reference dimension names directly because of the way he had named his dimensions. For example if a dimension had a purely numerical name it wouldn't work if you tried to reference it in an assignment. For example...

                    Code:
                    DIM 1= LOCATION OF CYLINDER CYL1 UNITS=MM ,$
                    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
                    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
                    Y 135.297 0.050 0.050 135.297 0.000 0.000 ----#----
                    Z -40.955 0.050 0.050 -40.955 0.000 0.000 ----#----
                    D 6.500 0.050 0.050 6.500 0.000 0.000 ----#----
                    END OF DIMENSION 1
                    ASSIGN/V1=1.D.MEAS
                    wouldn't work whereas this would...

                    Code:
                    DIM 1= LOCATION OF CYLINDER CYL1 UNITS=MM ,$
                    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO
                    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
                    Y 135.297 0.050 0.050 135.297 0.000 0.000 ----#----
                    Z -40.955 0.050 0.050 -40.955 0.000 0.000 ----#----
                    D 6.500 0.050 0.050 6.500 0.000 0.000 ----#----
                    END OF DIMENSION 1
                    ASSIGN/DPTR={1}
                    ASSIGN/V1=DPTR.D.MEAS

                • #11
                  I looked it over and it it differs quite a bit from the original script posted by Neil. This version seems much more customized for your application bfire85 , with pointers referencing your GeoTol commands. Theoretically, it would "just" be to exchange the original code section with "your" version of the script...
                  PC-DMIS CAD++ 2o19 R1 SP11

                  Comment


                  • #12
                    Originally posted by vpt.se View Post
                    I looked it over and it it differs quite a bit from the original script posted by Neil. This version seems much more customized for your application bfire85 , with pointers referencing your GeoTol commands. Theoretically, it would "just" be to exchange the original code section with "your" version of the script...
                    Looking at the VS, would that be lines 103 - 259? Is it as easy as delete, copy & paste?

                    Comment


                    • #13
                      Took a stab at converting the provided script.

                      ** NOTE ** This is *customized* for bfire85 !

                      Binaries and source included.

                      Take copies of some programs and drop these in a folder and run the app, point the app to the folder with your copied programs (not your production programs!). Let the app finish and check the programs to see if it did what you expected it to do.

                      The functions from the first script (post #1) has been replaced with the functions (see script in post #9) specific for bfire85 's application.
                      Other than that, the instructions for running the app are the same.
                      Attached Files
                      Last edited by vpt.se; 02-12-2021, 05:05 AM.
                      PC-DMIS CAD++ 2o19 R1 SP11

                      Comment


                      • #14
                        Originally posted by vpt.se View Post
                        Took a stab at converting the provided script.

                        ** NOTE ** This is *customized* for bfire85 !

                        Binaries and source included.

                        Take copies of some programs and drop these in a folder and run the app, point the app to the folder with your copied programs (not your production programs!). Let the app finish and check the programs to see if it did what you expected it to do.

                        The functions from the first script (post #1) has been replaced with the functions (see script in post #9) specific for bfire85 's application.
                        Other than that, the instructions for running the app are the same.
                        Thanks!

                        I ran it, but it stopped after a few programs (running invisible) with an error. Plus, the DPTR wasn't created to point to the feature name. Don't spend too much time on this, unless you really want to. I can forward you a program if you wanted to do additional testing.

                        I might go the route of programs made up to a certain point run 2020R1 and programs created after a certain point run 2020R2 and utilize the WAI Starter.

                        ​​​​ neil.challinor Is there a way that 2020R2 or later releases could still read Xact measure, in the background, and leave it alone. Xact would be disabled from any dropdowns/icons. But if you wanted to edit it, the software would force you change it to Geo Tol?

                        Comment


                        • neil.challinor
                          neil.challinor commented
                          Editing a comment
                          No, that wouldn't be possible. As soon as an existing routine is opened in 2020 R2 or later, it will go through the migration process. This happens as the routine is being read in - before it even shows in the edit window - so there is no way to circumvent it. Furthermore XactMeasure has been completely disabled inside of PC-Dmis in preparation for us to begin removing that code (which is now redundant).

                        • vpt.se
                          vpt.se commented
                          Editing a comment
                          At least the source is available if you (or anyone) want to continue fiddling with it. I haven't installed 2020 yet so blind debugging is kinda hard...

                        • bfire85
                          bfire85 commented
                          Editing a comment
                          neil.challinor But yet Legacy is still active even though we all know the issues it with doing position incorrectly pertaining to MMB. I know I am in the minority with my GETTEXT layout, but it causes me to enter into a very long, manual process getting this to work correctly for our company.

                      • #15
                        neil.challinor

                        What is the updated GETTEXT syntax for extracting data our of simultaneous evaluations?

                        Before, I could extract it as:

                        Code:
                        ASSIGN/FCF31=GETTEXT("LINE2_MEAS",1,{SIM_EVAL})
                        Then I could extract each line's measurement out with the LINE2_MEAS syntax.

                        Comment


                        • neil.challinor
                          neil.challinor commented
                          Editing a comment
                          The new simultaneous tolerance command does not contain any data itself, instead it controls when and how the dimensions relating to it are evaluated. If you watch the results as the .prg executes, you will see that dimensions relating to a simultaneous tolerance are initially held in a "waiting" state. Once all of the dimensions relating to the simultaneous tolerance command have been executed they will be evaluated simultaneously and show results. If you want to pull data from those dimensions you would reference the individual dimensions directly using the same syntax as any other geometric tolerance command, you would just need to make sure you did not try to read the result before it was available - so you would need to position your assignment after the simultaneous tolerance command in your routine.

                      Related Topics

                      Collapse

                      Working...
                      X