Skip to main content
Peter_Ensing
Participant
Sep 11, 2018 12:36 PM UTC
Answered

Button does not work

Hello All,

I'm trying to make a new 3D PDF template for Inventor with use of the autodesk samples.

Dropbox - Sample Assembly Template.pdf

The buttons I want to reproduce are, front view, back view, top view etc.

The code used is very simple:

this.akBom.setCameraToCannedView(this, "FRONT");

However, when I copy the existing button to a new form or reproduce it with the same settings and this JavaScript code it does not work.

Do you have an idea what I'm missing or need to do to get this to work?

Kind regards,

Peter

This topic is closed to new replies. Start a new post to keep the conversation going.
Joel Geraci
Joel GeraciCorrect answer
Community Expert
Sep 11, 2018 2:31 PM UTC

This is the output when I use the template, all buttons work:

Dropbox - CEP.01276.04.02-01104.pdf

When I copy the template buttons to a new template and Generate the output, no buttons work.


The buttons call a functions that reside in a document level script. The buttons won't work when you just copy them into another document, you also need to copy the document level script.

7 replies

Bernd Alheit
Community Expert
Community Expert
Sep 11, 2018 1:10 PM UTC

Look at the Javascript console for errors.

Translate
Peter_Ensing
Participant
Sep 11, 2018 1:18 PM UTC

Thanks for the fast reply.

It only gives me this error:

ReferenceError: ANARKCOREDATA is not defined

6:Document-Level:AnarkCoreScript

But this error is also given in the Autodesk sample that works (Inventor uses AnarkCore to export to 3D PDF).

Translate
Bernd Alheit
Community Expert
Community Expert
Sep 11, 2018 2:04 PM UTC

When I try the button I get the error:

this.akBom is undefined

Translate