01-20-2005 03:39 PM
01-24-2005 10:05 AM
10-16-2007 05:37 AM - edited 10-16-2007 05:37 AM
Hello,
I have the same problem : I don't know how to use GetSelectedLineFromViewer(). I think I need to create a C_CWMachineVision object before (with the cwMachineVision.Create() method) but I don't understant how to do it.
Please, can you help me ?
I'm using IMAQ Vision 6 with Visual Studio 6 (C++).
Message Edité par Corinne_ le 10-16-2007 05:38 AM
10-17-2007 01:04 PM
Private Sub Run_Click()
    'Inputs to LightMeterLine
    Dim SearchArea As New CWIMAQLine
    Dim Transformation As New CWMVCoordinateTransformation
    
    'Outputs of LightMeterLine
    Dim Report As New CWMVLightMeterLineReport
    
    'Get the line from the viewer.
    CWMachineVision1.GetSelectedLineFromViewer CWIMAQViewer1, SearchArea
    
    'Measure the intensity inside the search region
    CWMachineVision1.LightMeterLine CWIMAQViewer1.Image, SearchArea, Report, , Transformation
    'Display the mean intensity in a text box
    Text1.Text = Report.MeanIntensity
End Sub
Best Regards,
T. McCarty
10-18-2007 01:46 AM