Jump to content

User Functions and Producer API


amullen

Recommended Posts

I have written several of my own user-defined functions and stored them in a .js file on my workstation. My employer uses Fusion Pro Producer API (the server) for all of our Fusion Pro compositions; our license prevents us from composing more than one record directly.

 

My functions do not work with the server. After searching through these forums, I found that this is a known fact about Producer API. At least, it was; the most recent thread I found mentioning this fact is from 2009.

 

These functions would go a long way toward improving efficiency and reducing errors because they are used across many different templates. My employer has tasked me with implementing them; however, it seems that Fusion Pro itself is incapable of fulfilling my needs.

 

Is there any way I can get externally-defined functions stored in a .js file to work with the Fusion Pro Producer API? If not, are there any plans to implement this feature in the future?

Link to comment
Share on other sites

My functions do not work with the server. After searching through these forums, I found that this is a known fact about Producer API. At least, it was; the most recent thread I found mentioning this fact is from 2009.

If you place the .js files in the Plug-ins folder (by default, "C:\Program Files (x86)\PTI\FusionPro\Plug-ins") on the composition machine, then they should work for jobs composed on that machine. As far as I can recall, this has always worked. Where exactly did you read that it doesn't?

Is there any way I can get externally-defined functions stored in a .js file to work with the Fusion Pro Producer API?

Another option, instead of actually installing the .js files in the plug-ins folder, is to add them as resources to the job, and then use the Load() function to load them, in OnJobStart. They will then be collected up with the job, and different jobs can use different files.

 

Or, you can place all of the .js files in a common network location, and Load them via a UNC path (or specify the UNC path in the Search Path on the Advanced tab of the Composition Settings dialog), and as long as the composition machine can see the same UNC path as your design machine, everything should just work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...