PC-DMIS 2022.1 Object Library
ActiveComponent Property
See Also  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL > probe Object : ActiveComponent Property

Glossary Item Box

Description

Represents the highlighted probe component in PC-DMIS’s Probe dialog box.

Property type

Read-write property

Syntax

Visual Basic
Public Property ActiveComponent As Long

Return Type

Read/write Long value.

Example

The following VB code illustrates how to create a probe containing a PH9, a TP2, and a 5 mm tip, from scratch in the active measurement routine.

Option Explicit

Dim DmisApp As PCDLRN.Application

Dim DmisPart As PCDLRN.PartProgram

Dim DmisProbes As PCDLRN.Probes

Dim DmisProbe As PCDLRN.probe

Dim DmisTips As PCDLRN.Tips

Dim DmisTip As PCDLRN.Tip

Sub BuildProbe()

    Dim iCnt As Long

    Dim sProbe As String

    

    sProbe = "VGS102"

    

    Set DmisApp = CreateObject("PCDLRN.Application")

    If DmisApp Is Nothing Then

        MsgBox ("DmisApp is Nothing")

        Exit Sub

    End If

    Set DmisPart = DmisApp.ActivePartProgram

    If DmisPart Is Nothing Then

        MsgBox ("DmisPart is Nothing")

        Exit Sub

    End If

    Set DmisProbes = DmisPart.Probes

    If DmisProbes Is Nothing Then

        MsgBox ("DmisProbes is Nothing")

        Exit Sub

    End If

    

    DmisPart.Probes.Add (sProbe)

    Set DmisProbe = DmisProbes.Item(sProbe)

        If DmisProbe Is Nothing Then

        MsgBox ("DmisProbe is Nothing")

        Exit Sub

    End If

    DmisProbe.ActiveComponent = 0

    DmisProbe.ActiveConnection = 0

    

    For iCnt = 1 To DmisProbe.ComponentCount

        If (DmisProbe.ComponentDescription(iCnt) = "PROBEPH9") Then

            DmisProbe.ActiveComponent = iCnt

            Exit For

        End If

    Next iCnt

    For iCnt = 1 To DmisProbe.ComponentCount

        If (DmisProbe.ComponentDescription(iCnt) = "PROBETP2") Then

            DmisProbe.ActiveComponent = iCnt

            Exit For

        End If

    Next iCnt

    For iCnt = 1 To DmisProbe.ComponentCount

        If (DmisProbe.ComponentDescription(iCnt) = "TIP5BY50MM") Then

            DmisProbe.ActiveComponent = iCnt

            Exit For

        End If

    Next iCnt

End Sub

Private Sub Command1_Click()

    BuildProbe

End Sub

See Also

Copyright © 2022. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.