Missing Member Exception when Using Acrobat JSObject 3D calls

0

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?

vb.net
acrobat
asked on Stack Overflow Sep 21, 2017 by Marcel Rathbone

1 Answer

0

Use "selectedNode"... capital N.

The main document JavaScript engine and the one in the 3D annotation are different. I doubt the 3D JavaScript API is as forgiving about capitalization through the JSO as the Acrobat JavaScript is.

answered on Stack Overflow Sep 21, 2017 by joelgeraci

User contributions licensed under CC BY-SA 3.0