Jump to content

Storing User-Defined Functions


Robert

Recommended Posts

I am trying to create and store some user defined functions the book says to place your *.js file in C:\Program Files\Printable\FusionPro\plug-ins. What is the location for Mac users? There is not plug-ins sub folder.

 

Thank you

 

Robert

Link to comment
Share on other sites

I am trying to create and store some user defined functions the book says to place your *.js file in C:\Program Files\Printable\FusionPro\plug-ins. What is the location for Mac users? There is not plug-ins sub folder.

 

The Mac location is "/Library/Application Support/Printable/FusionPro/Plug-Ins".

 

Keep in mind the limitations of putting user-defined functions in these directories: primarily, that they will only be available on the machine with those .js files, so if you try to collect up the job and move it to another machine, or upload it to FusionPro Web or a similar system, those functions will be unavailable and you will get errors at composition time.

 

Instead of using the Plug-Ins folder, I recommend copying-and-pasting the functions into the JavaScript Globals for each job that's going to use them. Another alternative is to use the Load function in JavaScript to read in an external .js file from any arbitrary location (you could use a UNC path to share the same functions among multiple Windows machines on your network, or use a mounted drive on Mac). Or, you can use the "Import a data source from another document" option on the Define Data Source Wizard to import rules and functions from another job.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...