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

Otolith app error

Hi,

I have Image Pro Premier version 9.1.4 and have installed the "Otolith and Scale Ring Analysis App" version 9.1 downloaded today from your page. After clicking on the app icon, then the open folder button to open an image, selecting an image, the image does not load, and I get the following Project Workbench error:

(&H80004002) Specified cast is not valid.

Project 'Otolith', module '*AppForm.vb', line 2766, character -1.

That line in the app form says "For Each t As McGraphObjText In _annotationOverlay."

Then, after clicking "OK" on this error, closing the tabs for "AppForm.vb" and "Otolith.ipp", the image opens, and I am able to click "Next" to get to the calibration page of the Otolith app. Then, I select a valid calibration from the drop down menu, I get the exact same "Project Workbench error as above.

Then, I hit "OK" to close the error message, then close the "AppForm.vb" tab, I the  next button in the Otolith app is no longer active and the image is still open.

Your help is much appreciated :)

Best Answer

  • Answer ✓

    Hi,

    I got the same error in the same situation. There were no annotations on the image and the app was downloaded yesterday from the MediaCy website so I believe this is the most up to date version.

    There problem was with one of the functions:

     

        Private Function GetComment As McGraphObjText

            If _annotationOverlay IsNot Nothing Then

                _annotationOverlay.SetEnumFilter(mcGraphOverlayEnumWhat.mcgewMaster, "McGraphObjText")

                For Each t As McGraphObjText In _annotationOverlay

                    If t.UserData IsNot Nothing Then

                        If t.UserData.ToString = "Otolith_Comment" Then

                            Return t

                        End If

                    End If

                Next

            End If

      

    After looking at the code, it looked like the issue had to do with "McGraphObjText", so a Google search turned up this solution on your site:

    http://forums.mediacy.com/discussion/461/otolith-app-crashing

     

        Private Function GetComment As McGraphObjText

            If _annotationOverlay IsNot Nothing Then

                For Each go As McGraphObj In _annotationOverlay

                    If go.ClassName = "McGraphObjText" AndAlso go.UserData IsNot Nothing AndAlso go.UserData.ToString = "Otolith_Comment" Then

                        Return go

                    End If

                Next

            End If

     

            Return Nothing

        End Function

      

    After pasting the above in the app form, then re-loading the app, I no longer get the error.


    Thank you,

Answers

  • Hi kwmcneel,

    I suspect, you have some annotations on the image. It is not a solution, but try to remove them before running the app. You need to update the app. Please, contact to tech support.

    Thank you,
    Nikita.
  • I was having this issue which was caused by a faulty download having to do with our security settings. We had our IT department re-install and it worked. Sorry I don't have more details. I know it is very frustrating.
Sign In or Register to comment.