Home Image-Pro Automation (Macros, Apps, Reports)

Extracting 3D Measurements from 3D Table

Hello

How do you extract the measurements in 3D I tried the code below from 2D but it doesn't work in 3D.

	Dim data As McMMData
        Dim thevol As Single
        With ThisApplication.Output
            For Each sf1 As McMMSubFeature In data.SubFeatures
                thevol = sf1.Value(eMeasures.mNDvSurfVolume)
            Next
        End With
Regards
David

Best Answer

  • Answer ✓
    David,

    Getting 3D measurements is different. Here is the sample macro:

    Imports MediaCy.Viewers.ND
    ...
    Public Sub Get3DData()
        Dim wnd As McWindowND=ThisApplication.ActiveWindowEx.DocumentView
        If wnd Is Nothing Then Exit Sub
        Dim md As McNDData=wnd.GetMD()
        Dim n As Long=md.Count
        Dim sf As McNDSubFeature
        Dim m As MediaCy.Addins.Measurements.MeasEntry
        m=New MediaCy.Addins.Measurements.MeasEntry("mNDvSurfVolume")
        ThisApplication.Output.Show
        For i As Integer=0 To n-1
            sf=md.SubFeature(i)
            ThisApplication.Output.PrintMessage(String.Format("{0}, Volume = {1}",sf.Name,sf.Value(m)))
        Next
    End Sub
    

    Yuri

Answers

Sign In or Register to comment.