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.
Parents
  • 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.
Reply
  • 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.
Children
No Data