PPrivateString

Associates a string with the specified graphic, image, page, master page, story, text block, or publication. You can add private strings to more than one object at a time if the objects are the same type (class).


Command constructor

PPrivateData(const char * sDeveloperID, const char * sPlugInID, short CTargetClass, unsigned long nTypeFlag, unsigned long nTargetID, PMBool bChange, const char * sPrivateString);
const char * sDeveloperID;
Four-character string representing your name or your company name (e.g., "ADBE" for Adobe)
const char * sPlugInID;
Four-character string representing plug-in (e.g., "KYLN" for Keyline plug-in)
short cTargetClass;
kClassObject for imported graphics and images, as well as PageMaker lines, boxes, ovals, polygons, or text blocks
kClassStory for stories
kClassPub for publication (current publication only)
kClassPage for page
kClassMaster for master page
unsigned long nTypeFlag;
Identifier you define to distinguish between types of private data for same cTargetClass (but -1 and -2 are not allowed). If you don't need to classify your private data, use 0.
unsigned long nTargetID;
Internal PageMaker identifier for the element (graphic, image, text block, page, master page, or story) to which the private string is associated
0 (zero) for publication (PageMaker associates private strings with the current publication only)
PMBool bChange;
true or 1 to overwrite existing private string from same plug-in
false or 0 to return error (and leave private string unchanged) if the target already has private string from the same plug-in
const char * sPrivateString;
Private string
sDeveloperID. To ensure that no one else uses your four-character developer ID, you should register it with the Adobe Plug-ins Support Engineer.

Five parameters needed to identify data. PageMaker requires five parameters to identify a private string:

nTypeFlag. You define the value of nTypeFlag. This identifier distinguishes between the different types of private data associated with a class of objects (graphics, page, master page, story, or publication). Never set this ID to -1 or -2.

bChange. If the target already has a private string from the same plug-in and bChange is:

Exceptions. PPrivateString throws an exception if: Example. The following example creates a private string ("This is my string") for the object with target ID 15 and associates the private string with the developer "ADBE", the plug-in "KYLN", and the private ID 1.

PPrivateString("ADBE", "KYLN", kClassObject, 1, 15, true, "This is my string");


See also

The PDeletePrivateData and PPrivateData commands

The PGetPrivateData, PGetPrivateList, and PGetPrivateString queries


Copyright © 1996, Adobe Systems Incorporated. All rights reserved.

Comments or suggestions? Contact Adobe Developer Support