hexagon logo

Help with FCF dimension

I have these little OLE programs that I was updating to exe files to get rid of an annoying server busy error. And in some of our programs we have FCF dimensions that are making me crazy since they worked as a basic script but don't work as a exe file. Here is what I have for the code:

If ObjCmd.Type = 184 Then
                If Len(ObjCmd.ID) > 0 Then
                    PrevID = FCFid
                    FCFid = ObjCmd.ID
                End If
                FCFMeas = ObjCmd.GetFieldValue(LINE2_DEV, 1)
            End If


Any ideas on why it worked one way but not now?

And there used to be some examples of FCF coding on here, but I can't find it again. If you have examples you are willing to share, I would appreciate the posting of them so I could learn what you did.

Thanks so much for any help you can provide.
Parents
  • Any chance you could tell me what product you were referring to, which contains this?

    I suggest that you look at the source code of the PCD2EXCEL wizard (in the Wizards subfolder) - that's the only 'documentation' I have found covering getting data out of FCF:s. There seems to be lots of code for this handling - my export script more than doubled in size when I added FCF:s, and I'm still not finished...

    Sorry, can't share the full source of my export script as it is a product we sell, but here's an extract:


    ...
    Const LINE1_SIZE_TABLE = 1
    Const LINE2_POSITION_TABLE = 2
    Const LINE3_POSITION_TABLE = 3
    Const DATUM_SHIFT_TABLE = 4
    Const SUMMARY_TABLE = 5
    Const NOT_USED = 6
    Const LINE2_ORIENTATION_TABLE = 7
    Const LINE3_ORIENTATION_TABLE = 8
    Const LINE2_BASIC_DIMENSION_TABLE = 9
    Const LINE3_BASIC_DIMENSION_TABLE = 10
    ...
    ' LINE2_BASIC_DIMENSION_TABLE --> most simple FCF dimensions, one or more features
    '
      If cmd.GetFieldValue(RPT_DIMENSION_TABLES, LINE2_BASIC_DIMENSION_TABLE) = 1 Then
    
        For i = 1 To cmd.GetDataTypeCount(LINE2_FEATNAME)
          elValueType = cmd.GetFieldValue(LINE2_FEATNAME, i)
          elAct = cmd.GetFieldValue(LINE2_MEAS, i)
          elNom = cmd.GetFieldValue(LINE2_NOMINAL, i)
          elDev = cmd.GetFieldValue(LINE2_DEV, i)
          elMtol = cmd.GetFieldValue(LINE2_MINUSTOL, i)
          elPtol = cmd.GetFieldValue(LINE2_PLUSTOL, i)
          elOutTol = cmd.GetFieldValue(LINE2_OUTTOL, i)
          elStarted = 1
          PrintLine(fNum)
        Next i
      End If
    '
    


    Edit: I strongly suggest that you should use the enumeration codes. Most of them don't need to be declared, they are defined in the type library.


    Is there any chance you could tell me which Hexagon product you were referring to? I am simply looking to get ID and Measure to an excel sheet from dimensions and Feature Control Frames. I am unable to locate the source code for PCD2Excel.

    Thanks!
Reply
  • Any chance you could tell me what product you were referring to, which contains this?

    I suggest that you look at the source code of the PCD2EXCEL wizard (in the Wizards subfolder) - that's the only 'documentation' I have found covering getting data out of FCF:s. There seems to be lots of code for this handling - my export script more than doubled in size when I added FCF:s, and I'm still not finished...

    Sorry, can't share the full source of my export script as it is a product we sell, but here's an extract:


    ...
    Const LINE1_SIZE_TABLE = 1
    Const LINE2_POSITION_TABLE = 2
    Const LINE3_POSITION_TABLE = 3
    Const DATUM_SHIFT_TABLE = 4
    Const SUMMARY_TABLE = 5
    Const NOT_USED = 6
    Const LINE2_ORIENTATION_TABLE = 7
    Const LINE3_ORIENTATION_TABLE = 8
    Const LINE2_BASIC_DIMENSION_TABLE = 9
    Const LINE3_BASIC_DIMENSION_TABLE = 10
    ...
    ' LINE2_BASIC_DIMENSION_TABLE --> most simple FCF dimensions, one or more features
    '
      If cmd.GetFieldValue(RPT_DIMENSION_TABLES, LINE2_BASIC_DIMENSION_TABLE) = 1 Then
    
        For i = 1 To cmd.GetDataTypeCount(LINE2_FEATNAME)
          elValueType = cmd.GetFieldValue(LINE2_FEATNAME, i)
          elAct = cmd.GetFieldValue(LINE2_MEAS, i)
          elNom = cmd.GetFieldValue(LINE2_NOMINAL, i)
          elDev = cmd.GetFieldValue(LINE2_DEV, i)
          elMtol = cmd.GetFieldValue(LINE2_MINUSTOL, i)
          elPtol = cmd.GetFieldValue(LINE2_PLUSTOL, i)
          elOutTol = cmd.GetFieldValue(LINE2_OUTTOL, i)
          elStarted = 1
          PrintLine(fNum)
        Next i
      End If
    '
    


    Edit: I strongly suggest that you should use the enumeration codes. Most of them don't need to be declared, they are defined in the type library.


    Is there any chance you could tell me which Hexagon product you were referring to? I am simply looking to get ID and Measure to an excel sheet from dimensions and Feature Control Frames. I am unable to locate the source code for PCD2Excel.

    Thanks!
Children
No Data