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
  • DIMENSION_TRUE_END_POSITION is correct.

    There is an error here though. 'Type' is not a member of DimensionCommand, it is a member of Command. It should be:
    If (ObjCmd.Type = DIMENSION_TRUE_END_POSITION) Then


    Because it mentions dimension in the code it is a command but if it is a dimension it is a dimensioncommand? Obviously, I am still trying to figure this all out.

    And then if I am using a command fuction, it should not appear under the if objcmd.is... statement?

    I know, dumb questions.

    Oh, and don't just generally set the id as if id = "" then id = previd; previd = strdimid. It sends it into a loop that makes all the id's the same as whatever id you have first. It was a bad experiement.
Reply
  • DIMENSION_TRUE_END_POSITION is correct.

    There is an error here though. 'Type' is not a member of DimensionCommand, it is a member of Command. It should be:
    If (ObjCmd.Type = DIMENSION_TRUE_END_POSITION) Then


    Because it mentions dimension in the code it is a command but if it is a dimension it is a dimensioncommand? Obviously, I am still trying to figure this all out.

    And then if I am using a command fuction, it should not appear under the if objcmd.is... statement?

    I know, dumb questions.

    Oh, and don't just generally set the id as if id = "" then id = previd; previd = strdimid. It sends it into a loop that makes all the id's the same as whatever id you have first. It was a bad experiement.
Children
No Data