hexagon logo

OUTTOLS Script help

I am using the OUTTOLS script found here but need help modifying it for my needs.

We have a part that gets checked on the CMM then data is written to a csv file to be uploaded to a customers database. However if a part has an OOT dimension we rework the part and check it again. I need a way to evaluate for an OOT condition and if there is one to NOT send any data to my csv file. How can I modify the aforementioned script to pass a variable back to PCD? I will then use that variable in an IF/THEN statement to determine whether or not to export the data. Thanks!
Parents
  • The only place you set the variable ID is inside the 'If objCmd.IsDimension' condition. An FCF is not fulfilling that condition (to me, that feels like a bug!), so you never change the ID. You need to add

    ID = objCmd.ID

    after

    If objCmd.Type = 184 Then

    Also, I think the number 184 there should be the (predefined) constant FEATURE_CONTROL_FRAME.

    And the number 1000 in

    If objCmd.IsDimension And objCmd.Type <> 1000 Then

    should be DIMENSION_START_LOCATION. I also think you need to exclude DIMENSION_TRUE_START_POSITION, DIMENSION_END_LOCATION and DIMENSION_TRUE_END_POSITION too, as these commands are 'brackets' around the actual dimension lines and don't have any valid .outtol, as far as I know.
Reply
  • The only place you set the variable ID is inside the 'If objCmd.IsDimension' condition. An FCF is not fulfilling that condition (to me, that feels like a bug!), so you never change the ID. You need to add

    ID = objCmd.ID

    after

    If objCmd.Type = 184 Then

    Also, I think the number 184 there should be the (predefined) constant FEATURE_CONTROL_FRAME.

    And the number 1000 in

    If objCmd.IsDimension And objCmd.Type <> 1000 Then

    should be DIMENSION_START_LOCATION. I also think you need to exclude DIMENSION_TRUE_START_POSITION, DIMENSION_END_LOCATION and DIMENSION_TRUE_END_POSITION too, as these commands are 'brackets' around the actual dimension lines and don't have any valid .outtol, as far as I know.
Children
No Data