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

  • [COLOR=#ff0000]For ix = 1 To ObjCmds.Count[/COLOR]
    Set ObjCmd = ObjCmds(ix)
    
    [COLOR=#ff0000]For Each ObjCmd in ObjCmds[/COLOR]
    .
    .
    .
    .


    Yikes - don't do this! You have nested loops that scan through the entire program. So, if the program has 10,000 commands, you are going to scan through the entire program 10,000 times. Use one technique or the other, not both.
Reply

  • [COLOR=#ff0000]For ix = 1 To ObjCmds.Count[/COLOR]
    Set ObjCmd = ObjCmds(ix)
    
    [COLOR=#ff0000]For Each ObjCmd in ObjCmds[/COLOR]
    .
    .
    .
    .


    Yikes - don't do this! You have nested loops that scan through the entire program. So, if the program has 10,000 commands, you are going to scan through the entire program 10,000 times. Use one technique or the other, not both.
Children
No Data