hexagon logo

Calculate amount touchpoints

Hello.
How I can calculate amount touchpoints in my program?
Thank!
Parents
  • It is my code from calculate numbers of hits.
    Sub Main()
    Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand
    Dim numhits As Integer
    Set PCDApp = CreateObject ("PCDLRN.Application")
    Set PCDPartPrograms = PCDApp.PartPrograms
    Set PCDPartProgram = PCDApp.ActivePartProgram
    Set PCDCommands = PCDPartProgram.Commands
    Dim cmd As Object
    Dim Fcntr As Integer
    Dim FeatureList(9999)
    Dim b As Integer
    Dim a As Integer
    Fcntr = 0
    For Each cmd In PCDCommands
    If cmd.IsMeasuredFeature Then
    FeatureList(Fcntr) = cmd.ID
    Fcntr = Fcntr + 1
    End If
    If cmd.IsDCCFeature Then
    FeatureList(Fcntr) = cmd.ID
    Fcntr = Fcntr + 1
    End If
    Next cmd
    b=0
    For a =0 To (Fcntr-1)
    Set PCDCommand = PCDCommands.Item(FeatureList(a))
    nhits = PCDCommand.GetText(N_HITS, 0)
    nhits=nhits+b
    b=nhits
    Next a
    MsgBox(b)
    
    'Cleanup
    Set PCDApp = Nothing
    Set PCDPartPrograms = Nothing
    Set PCDPartProgram = Nothing
    Set prbhit = Nothing
    
    End Sub


    BUT! This code not account hits of vectorpoints
Reply
  • It is my code from calculate numbers of hits.
    Sub Main()
    Dim PCDApp, PCDPartPrograms, PCDPartProgram, PCDCommands, PCDCommand
    Dim numhits As Integer
    Set PCDApp = CreateObject ("PCDLRN.Application")
    Set PCDPartPrograms = PCDApp.PartPrograms
    Set PCDPartProgram = PCDApp.ActivePartProgram
    Set PCDCommands = PCDPartProgram.Commands
    Dim cmd As Object
    Dim Fcntr As Integer
    Dim FeatureList(9999)
    Dim b As Integer
    Dim a As Integer
    Fcntr = 0
    For Each cmd In PCDCommands
    If cmd.IsMeasuredFeature Then
    FeatureList(Fcntr) = cmd.ID
    Fcntr = Fcntr + 1
    End If
    If cmd.IsDCCFeature Then
    FeatureList(Fcntr) = cmd.ID
    Fcntr = Fcntr + 1
    End If
    Next cmd
    b=0
    For a =0 To (Fcntr-1)
    Set PCDCommand = PCDCommands.Item(FeatureList(a))
    nhits = PCDCommand.GetText(N_HITS, 0)
    nhits=nhits+b
    b=nhits
    Next a
    MsgBox(b)
    
    'Cleanup
    Set PCDApp = Nothing
    Set PCDPartPrograms = Nothing
    Set PCDPartProgram = Nothing
    Set prbhit = Nothing
    
    End Sub


    BUT! This code not account hits of vectorpoints
Children
No Data