hexagon logo

Have the roundness of an auto-circle in a variable

Hi there,

I am trying to have the roundness of an auto-element in a variable. I cannot use a dimension as I have 30,000 circles and try to export all of these roudnesses via a script to a txt file.

Does anyone knows how to call the roundness of an auto-circle into a variable?

Thanks in advance.
Parents
  • I tried to update the code according to neil's info:

    You can also read the center data from the FeatureCommand-object
    but there is no example for this and I just didn't had time to trying it out

    i dont have vision
    and can therefore not test whether "PCDCommand.GetText(THEO_X, 0)" is read correctly in FeatureType "245"

    "PCDCommand.GetText(THEO_X, 0)" is not working with FeatureType "202"

    please try it out



    CONTACT_CIRCLE_FEATURE = 612
    MEASURED_CIRCLE = 202
    VISION_CIRCLE_FEATURE = 245


    [...]
    If PCDCommand.IsFeature Then
    If (PCDCommand.Type = 612) Or (PCDCommand = 202) Or (PCDCommand = 245) Then
    If Left(PCDCommand.ID, 3) = "CIR" Then
    Set FCmd = PCDCommand.FeatureCommand
    
    tX = PCDCommand.GetText(THEO_X, 0)
    tY = PCDCommand.GetText(THEO_Y, 0)
    tZ = PCDCommand.GetText(THEO_Z, 0)
    tD = FCmd.TheoDiam 'tD = PCDCommand.GetText(THEO_DIAM, 0)
    
    mX = PCDCommand.GetText(MEAS_X, 0)
    mY = PCDCommand.GetText(MEAS_Y, 0)
    mZ = PCDCommand.GetText(MEAS_Z, 0)
    mD = FCmd.MeasDiam 'mD = PCDCommand.GetText(MEAS_DIAM, 0)
    
    tRound = FCmd.GetFormError()
    
    Write #1, PCDCommand.ID & ", " & tX & ", " & tY & ", " & tZ & ", " & tD & ", " & tRound & ", " & mX & ", " & mY & ", " & mZ & ", " & mD & ", " & mRound
    
    End If
    End If
    End If
    [...]
    
Reply
  • I tried to update the code according to neil's info:

    You can also read the center data from the FeatureCommand-object
    but there is no example for this and I just didn't had time to trying it out

    i dont have vision
    and can therefore not test whether "PCDCommand.GetText(THEO_X, 0)" is read correctly in FeatureType "245"

    "PCDCommand.GetText(THEO_X, 0)" is not working with FeatureType "202"

    please try it out



    CONTACT_CIRCLE_FEATURE = 612
    MEASURED_CIRCLE = 202
    VISION_CIRCLE_FEATURE = 245


    [...]
    If PCDCommand.IsFeature Then
    If (PCDCommand.Type = 612) Or (PCDCommand = 202) Or (PCDCommand = 245) Then
    If Left(PCDCommand.ID, 3) = "CIR" Then
    Set FCmd = PCDCommand.FeatureCommand
    
    tX = PCDCommand.GetText(THEO_X, 0)
    tY = PCDCommand.GetText(THEO_Y, 0)
    tZ = PCDCommand.GetText(THEO_Z, 0)
    tD = FCmd.TheoDiam 'tD = PCDCommand.GetText(THEO_DIAM, 0)
    
    mX = PCDCommand.GetText(MEAS_X, 0)
    mY = PCDCommand.GetText(MEAS_Y, 0)
    mZ = PCDCommand.GetText(MEAS_Z, 0)
    mD = FCmd.MeasDiam 'mD = PCDCommand.GetText(MEAS_DIAM, 0)
    
    tRound = FCmd.GetFormError()
    
    Write #1, PCDCommand.ID & ", " & tX & ", " & tY & ", " & tZ & ", " & tD & ", " & tRound & ", " & mX & ", " & mY & ", " & mZ & ", " & mD & ", " & mRound
    
    End If
    End If
    End If
    [...]
    
Children
No Data