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
  • Thanks! No need for a beverage - just post your code here so others can learn and benefit from it.

    As a sidenote, I don't think the MeasHeight will give you what you are looking for, though.
    If you are looking for the measured Z-value, you should use this instead:

    MeasZ = ObjCmd.GetText(MEAS_Z, 0)


    The code can (probably will) error out if it encounter a feature command that does not have a MeasDiam or MeasHeight property,
    but you'll probably notice that. Wink
Reply
  • Thanks! No need for a beverage - just post your code here so others can learn and benefit from it.

    As a sidenote, I don't think the MeasHeight will give you what you are looking for, though.
    If you are looking for the measured Z-value, you should use this instead:

    MeasZ = ObjCmd.GetText(MEAS_Z, 0)


    The code can (probably will) error out if it encounter a feature command that does not have a MeasDiam or MeasHeight property,
    but you'll probably notice that. Wink
Children
No Data