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
  • Even using this method, I get a null reading. I used something like this Dim MeasZ As String then under my declaration it was MeasZ = ObjCmd.GetText (MEAS_Z, 0) In my If statments it went somthing like this

    If StrDimID = "POINT1" Then MyReading9 = StrDimMeasure

    And I have tried POINT1, POINT1 Z, AND POINT1- ON STEP as the variable. Nothing on any of those.

    I have done this for the MEAS_DIAM call out as well and still a null reading. That is using CIRC2 DIA, CIRC2, CIR2, and CIR2- OUTER CIRCLE ABOVE STEP as the variables as well.

    What am I doing wrong? I just can't think of anything else to do.

    Is this maybe because I am changing a String variable into a Double variable (StrDimMeasure is a String and MyReading# is a Double)? And why would it work on some and not others?
Reply
  • Even using this method, I get a null reading. I used something like this Dim MeasZ As String then under my declaration it was MeasZ = ObjCmd.GetText (MEAS_Z, 0) In my If statments it went somthing like this

    If StrDimID = "POINT1" Then MyReading9 = StrDimMeasure

    And I have tried POINT1, POINT1 Z, AND POINT1- ON STEP as the variable. Nothing on any of those.

    I have done this for the MEAS_DIAM call out as well and still a null reading. That is using CIRC2 DIA, CIRC2, CIR2, and CIR2- OUTER CIRCLE ABOVE STEP as the variables as well.

    What am I doing wrong? I just can't think of anything else to do.

    Is this maybe because I am changing a String variable into a Double variable (StrDimMeasure is a String and MyReading# is a Double)? And why would it work on some and not others?
Children
No Data