Skip to main content
marcelr72345889
Participant
September 21, 2017
Question

Missing Member Exception when using JSObject

  • September 21, 2017
  • 0 replies
  • 549 views

I am busy trying to write a basic application in vb.net to select a specific node in a 3D PDF using acrobats 3D API. I am viewing the 3D PDF in a form using this code:

        Dim avdoc As Acrobat.CAcroAVDoc

        Dim pddoc As Acrobat.CAcroPDDoc

        Dim jso As Object

        Dim a3d As Object

        avdoc = CreateObject("AcroExch.AVDoc")

        avdoc.OpenInWindowEx("C:\Users\Marcel\Documents\TFC Test\3C555-01-01.pdf", Me.Handle.ToInt32, 1, True, 0, 1, 1, 0, 0, 0)

        pddoc = avdoc.GetPDDoc()

        jso = pddoc.GetJSObject

        a3d = jso.getAnnot3D(0, "3D Annot 0")

        a3d.activated = True

        MsgBox(a3d.context3D.scene.meshes.count)

        a3d.context3D.scene.selectednode = a3d.context3D.scene.meshes.getByIndex(0)

When executing this code the count of meshes (24) displays properly, but the line to select the node gives the following error:

'Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))'

From some further inspection it appears that I can access any of the properties of the 3D objects but cannot access their functions.

I have looked around but can't seem to find any info on this. Does anyone know how to resolve this or what I might be doing wrong?

This topic has been closed for replies.