jdubs edited this page Oct 21, 2016 · 1 revision

Table of Contents


Retrieves an Image Element resource stored in the Shared folder of the project.


ImageElement (constant) The variable for assignment of the shared image. Variable must be an Image type.

Name (multiple) The name of the resource to retrieve.

SharedPath (multiple) The shared path id provided by Four51. It must contain the shared resource unique ID, and the project sub folder of the resources you are retrieving.

ErrorMessage (multiple | optional) The error message to return when any error occurs.


This method allows an easier method of shared Image usage.

Special Note

Four51 designates a variable named four51sharedpath that contains the location of the shared resources in the application environment. This path differs between environments such as the demo, beta and production environment. You can override this value locally for testing. Define the variable and in the job preview set the local file path value.

Source Code

public static void SharedImage(object ImageElement, object Source, object SharedPath, object ErrorMessage)
		Image img = (Image)Application.CurrentDocument.FindElement((string)ImageElement);
		img.Source = SharedUNCPath + (string)SharedPath + "\\" + (string)Source;
		if (img.SourceResolved == null)
			throw new Four51ActionsException("Shared resource not found");
	catch (Exception ex)
		throw new Four51ActionsException(ex.Message, (string)ErrorMessage);

Referenced Methods

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.