hexagon logo

Help with OLE Automation

Now that I have information in a way that imports and exports the information correctly, I have been tasked with creating an OLE to automatically import the data into the SPC software. I have one that sort of works (as in opens the program, logs in, opens the right collection plan, etc) and I can get put in static information, but I am unsure how to call the information out of PC DMIS to have it be placed in the spots we need in the SPC software being used.

Has anyone else done this? Can anyone explain to me how find the variable and the measurement output in PC DMIS? I am using version 4.2 if that helps any.

Thanks so much.
  • There are several CSV solutions in here, created for this particular task.
    Have you been looking around for them to see if they can do what you are looking for?
  • There are several CSV solutions in here, created for this particular task.
    Have you been looking around for them to see if they can do what you are looking for?


    Thanks, and yes, I have been looking at them, but we need to move the results of the CMM data into our SPC system to get the data collected on the CMM and the data we are collecting manually to coincide. An OLE automation would do that and not put any extra pressure on our operators and would ensure that the data was collected into the SPC software.

    The OLE program works to a point. I can get it to accept static values, but can't quite get the right commands in place to get it to accept dynamic values from the program on the CMM that was just run. So I am close to what we need, but not quite there yet. So, any advice on how those values should be called out would be great.

    Thanks so much.
  • What dynamic values are you referring to? Do you have any example of what you are trying to collect from PC-DMIS?
  • The SPC software name might help as well. Someone might already have something, but without knowing what software it is.......
  • What dynamic values are you referring to? Do you have any example of what you are trying to collect from PC-DMIS?


    Here is the code from the program:
    DIM CIRC2 DIA
    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
    D 3.6460 0.0020 0.0020 3.6435 -0.0025 0.0005

    And in this example, I need the measurement of circ2.

    Thank you.
  • The SPC software name might help as well. Someone might already have something, but without knowing what software it is.......


    WinSPC created by DQS.

    Thank you.
  • Here is the code from the program:
    DIM CIRC2 DIA
    AX NOMINAL +TOL -TOL MEAS DEV OUTTOL
    D 3.6460 0.0020 0.0020 3.6435 -0.0025 0.0005

    And in this example, I need the measurement of circ2.

    Thank you.


    Scan through the partprogram commands until you hit a dimension command.
    Define your destination object as a dimension command.
    (you obviously have other names in your code)

    For i = 1 To PCDCommands.Count
    Set MyCommand = PCDCommands(i)
    If MyCommand.IsDimension Then
    Set MyDimensionCmd = MyCommand.DimensionCommand
    


    Now you will have access to the different properties of a dimension command in PC-DMIS through MyDimensionCmd +

    .ID
    .TypeDescription
    .Deviation
    .Nominal
    .Minus
    .Plus
    .OutTol
    ...

    ...and so on - check the helpfile for the properties available.
  • Or look at the VB code for the PCD2EXCEL Wizard (in the Wizards subfolder).
  • Or look at the VB code for the PCD2EXCEL Wizard (in the Wizards subfolder).


    +1
  • Thank you so much, vpt and Anders1. I appreciate the help and the hints on where to find more information. I have never programmed in VB before and while it is similar to Java, it is not quite the same and I just couldn't quite get how I was going to get this to work. I appreciate all the help.