ResourceManager object
Represents a collection of all image objects available in the Resource Manager (an user interface utility used to load, manage and share pictures in the Interactive Reporting document file).
The Images collection supports the following picture graphics objects:
BMP—Bitmap (default picture object)
GIF—Graphic Interchange Format
JPG, JPEG—JPEG File Interchange Format
PNG—Portable Network Graphics Format
The Add (Method) for this collection takes two argument. The first argument is a string. This is equivalent to specifying the path to the image. The value provided must be string representing the windows path, mapped windows network drive, UNC path, or UNIX path. If no value is specified, the method does not operate correctly and generates an exception. The second argument is also a string. This is equivalent to selecting a given image from the resource manager in the user interface. The value provided must be string representing the case-sensitive name for an image that appears for an image in the resource manager. The default value for the second parameter is the file name of the picture. If the display name is not specified, Interactive Reporting assigns a file name is to the image.
The FindItems (Method ) is equivalent to determining a group of images with the same name in the Resource Manager user interface. The return value is a pseudo-array containing all images in the Resource Manager with the display name equal to selected. The first item in the array is at ordinal 1.
The Item (Method) takes one argument. The argument is a number or string. This is equivalent to selecting the n object in a list, or an object byname. The value provided must be string representing an integer between 1 and the number of like objects present, or a string matching an item name. The default value is 1.
This example shows how to add the image “splash.jpg” to the Resource Manager:
ActiveDocument.ResourceManager.Images.Add("c:\\splashy.jpg")
This example shows how to find a group of images with the same name in the Resource Manager. The return value is captured by the Count property and displayed in a text box.
//Clear all TextBoxes except TextBox5 TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" var ActionName = "RM FindItems()" TextBox1.Text ="Start " + ActionName strDisplayName = TextBox5.Text if (TextBox5.Text == "") { try { arrFindRM= ActiveDocument.ResourceManager.Images.FindItems("Waves") //arrFindRM= ActiveDocument.ResourceManager.Images.FindItems("") TextBox3.Text = "Count for this image is: " + arrFindRM.Count ActiveSection.Shapes["ListBox2"].RemoveAll() for (i = 1; i <= arrFindRM.Count; i++) { Console.Writeln(arrFindRM[i].Name) ActiveSection.Shapes["ListBox2"].Add(arrFindRM[i].Name) } //end for } //end try catch(e) { TextBox2.Text = "Caught: " + e.toString() }//end catch } //end if else { try { arrFindRM= ActiveDocument.ResourceManager.Images.FindItems(TextBox5.Text) TextBox3.Text = "Count for this image is: " + arrFindRM.Count ActiveSection.Shapes["ListBox2"].RemoveAll() for (i = 1; i <= arrFindRM.Count; i++) { Console.Writeln(arrFindRM[i].Name) ActiveSection.Shapes["ListBox2"].Add(arrFindRM[i].Name) } //end for } //end try catch(e) { TextBox2.Text = "Caught: " + e.toString() }//end catch } TextBox1.Text ="End " + ActionName
Add (String Path, [optional] string displayName). FindItems(String DisplayName), Item (Value IndexOrUID), Remove(ResourceManagerImage image), RemoveAll()
Read only:Count as Number