Revision history:
Introduced in QPR 8.0
Last changed in QPR 2023.1
Sets a value of an element's attribute or custom attribute defined by Extended property name.
Synopsis:
PGModel.SetProperty(FullId, ExtendedPropertyName, Value)
Parameters:
FullId: ID of the element or element instance. Mandatory. No Default value. Supported formats for defining the element:
ElementId: Integer. ID of the element.
ElementId[.InstanceId]: String. ID and an optional instance ID of the element.
ElementSymbol[.InstanceId]: String. The symbol and an optional instance ID of the element.
ExtendedPropertyName: String. Defines the attribute or custom attribute name. Note that cardinality N attributes contain the attribute index extension '(<index>)'. See the listing below for supported properties for different element types:
Common properties for model objects:
ElementTypeId, id
Name, string
Description, string
InformationItems, array
Notes, array
Resources, array
Priority, double
CanBeSuspended, boolean
ScoreCardModel, string. Requires using InstanceId to set the property.
ScorecardIdentifier, string. Requires using InstanceId to set the property.
MeasureIdentifier, string. Requires using InstanceId to set the property.
InterfaceElement, boolean
Symbol, string
Common properties for instances:
Note that these can be used only if instance parameter is set.
InstanceProcessLevel, int
InstanceSCModel, string
InstanceSCIdentifier, string
InstanceSCMeasure, string
IncomingFlows, array
OutgoingFlows, array
FullId refers to a process step:
Owner, id
SimulationEntryRule, int
EntryRules, array
EntryRuleCaseMatching, boolean
SimulationExitRule, int
ExitRules, array
ProcessingTimeType, int
ProcessingTimes, array
InputFrequencyType, int
InputFrequencies, array
IsStartingProcessStep, boolean
MaxInputs, int
ModelingDirection, int
IsUseDefaultModelingDirection, boolean.
ChildProcessSteps, array
ChildGroups, array
ChildFlows, array
ChildStores, array
FlowCompositions, array
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
FillGraphicalProperties, array with the following columns:
•Style, integer (0 = transparent, 1 = solid, 2 = gradient, 3 = texture, 4 = hatch)
•Primary color, integer
•Primary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Secondary color, integer
•Secondary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Gradient type, integer (1 = linear, 2 = rectangle)
•Gradient mode, integer (0 = horizontal, 1 = vertical, 2 = forward diagonal, 3 = backward diagonal)
•Texture wrap mode, integer (0 = tile, 1 = tile flip X, 2 = tile flip Y, 3 = tile flip XY, 4 = clamp)
•Hatch style, integer (0-52)
Contents of the FillGraphicalProperties array depends on the style. For transparent fills, only primary transparency is included. For solid fills, both primary color settings are included. For gradients the array contains both primary and secondary color settings as well as gradient settings. For textures there are primary color settings and texture wrap mode included, but the actual texture is not available. For hatch fill style there are both primary and secondary color settings as well as hatch style setting. In case the value is below the accepted range, the minimum value is use. Similarly the maximum value is used for values above the accepted range.
Instance related properties: ElementHeight (int), ElementWidth(int), ElementPosX(int), ElementPosY(int)
IsUseVersionInformation, boolean. This property is supported only for diagram type process steps.
VersionNumber, string. This property is supported only for diagram type process steps.
Status, enumerated. This property is supported only for diagram type process steps.
Author, string. This property is supported only for diagram type process steps.
Comment, string. This property is supported only for diagram type process steps.
ProcessStepsOnProcessLevel, array with two columns: object id and instance id
Elements, array with two columns: object ID and instance ID. This property is valid for all objects that have a child level.
MappedConnectors, array of connector ids. For input or output interfaces, returns the connectors mapped to the interface.
InGroups, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
InstancesInGroup, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
AttachedTo, array with two columns: object ID and instance ID. Can only be set for elements of types that support behavior "Allow attaching to elements". The value parameter must be an array with exactly one row. If object ID and instance ID are both 0, the attachment relation is removed from the element instance.
AttachedInstances, array with two columns: object ID and instance ID. Can only be set for elements of types that support behavior "Allow attached elements". Any invalid values such as non-existing ids are ignored and not treated as errors.
DiagramContent, a two-dimensional array of four values: offset.X, offset.Y, visible, instance id. The values can be set for an element or an instance, as long as the element has a diagram content field.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
ExternalModelId, ID of the linked server model. Setting this property also also sets the InformationLocation string if client is connected to server. This property is supported only for external model type process steps.
ExternalModelDiagramId, ID of the linked server model's diagram. This property is supported only for external model type process steps.
ExternalModelDiagramName, string. The linked server model diagram's name. Setting this property also also sets InformationLocation string if client is connected to server. This property is supported only for external model type process steps.
URL, string. Stores the URI, e.g. "http://www.qpr.com". This property is supported only for external model type process steps.
DiagramTypeGroup, string. Sets the Type Group for diagram element by Type Group symbol. If the Type Group symbol is empty or an empty string, sets the element type's default. This property is supported only for diagram type process steps and element types.
FullId refers to a connector:
From, id
To, id
Owner, id
Document, id
ProcessingTimeType, int
ProcessingTimes, array
InputFrequencyType, int
InputFrequencies, array
IsStartingFlow, boolean
FlowArrowStyle, either a single arrow style value (integer: 0 = Elbow, 1 = Straight, 2 = Curve, 3 = Elbow - rounded, 4 = Elbow - bent) or a two-dimensional array with one row for each arrow of the flow, the first column containing the arrow style value and the second column containing the arrow's diagram id (integer). If the array defines different arrow styles for the arrows, but the connector type does not have "Instances can have different graphical properties", one of the styles in the array becomes the style for all arrows.
FlowPoints, two-dimensional array containing integer X and Y pairs in the first two columns and diagram ID in the third column. The first row contains the starting coordinates for a flow's path and the last row contains the ending coordinates. Diagram definition (third column) is needed to flows that go through multiple diagrams, with single-level flows the third column can be left empty. Note that the FlowPoints property cannot be used to connect or disconnect a flow from elements.
NameFieldRelativePos, array with three columns:
•empty | Percentage, integer, percentage 0-100 - position of the label is set to the percentage value relative to point at start
•empty | X, integer, relative to point at start (or end)
•empty | Y, integer, relative to point at start (or end)
PGModel.GetProperties will return three values depending on what Position anchor type (default position, relative to start point, relative to end point, relative to point at start) is:
oIf default position, then all three values are empty.
oIf relative to point at start, then first value is the percentage and two others empty.
oIf relative to start point or relative to end point, then first value is empty and two others are X and Y.
MaxInputs, int
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
MappedSourceInterface, id. The interface element that is mapped to the connector start.
MappedDestinationInterface, id. The interface element that is mapped to the connector end.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to an organization item:
ParentOrganizationUnit, id
ChildOrganizationUnits, array
ProcessSteps, array
Persons, array
OrganizationType, int
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
FillGraphicalProperties, array with the following columns:
•Style, integer (0 = transparent, 1 = solid, 2 = gradient, 3 = texture, 4 = hatch)
•Primary color, integer
•Primary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Secondary color, integer
•Secondary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Gradient type, integer (1 = linear, 2 = rectangle)
•Gradient mode, integer (0 = horizontal, 1 = vertical, 2 = forward diagonal, 3 = backward diagonal)
•Texture wrap mode, integer (0 = tile, 1 = tile flip X, 2 = tile flip Y, 3 = tile flip XY, 4 = clamp)
•Hatch style, integer (0-52)
Contents of the FillGraphicalProperties array depends on the style. For transparent fills, only primary transparency is included. For solid fills, both primary color settings are included. For gradients the array contains both primary and secondary color settings as well as gradient settings. For textures there are primary color settings and texture wrap mode included, but the actual texture is not available. For hatch fill style there are both primary and secondary color settings as well as hatch style setting. In case the value is below the accepted range, the minimum value is use. Similarly the maximum value is used for values above the accepted range.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to a case:
SimulationStarted, date
SimulationEnded, date
FullId refers to a connector composition:
Document, id
ProcessLevel, id
ParentComposition, id
ChildCompositions, array
FlowPoints, two-dimensional array containing integer X and Y pairs in the first two columns and diagram ID in the third column. The first row contains the starting coordinates for a flow's path and the last row contains the ending coordinates. Diagram definition (third column) is needed to flows that go through multiple diagrams, with single-level flows the third column can be left empty. Note that the FlowPoints property cannot be used to connect or disconnect a flow from elements.
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
•ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to a measure:
MeasureValueType, int
MeasureSubprocessCalculationType, int
MeasureUnitType, int
UnitNames, array
LinkedMeasureDatas, array
FullId refers to measure data:
MeasureDataList, array in two dimensions, indexes in 2nd dimension: 0-CaseId, 1-StartTime(datetime), 2-EndTime(datetime), 3-StartValue(double), EndValue(double)
Measure, id
ModelObject, id
FullId refers to a note:
ParentNote, id
ChildNotes, array
ModelObject, id
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
FillGraphicalProperties, array with the following columns:
•Style, integer (0 = transparent, 1 = solid, 2 = gradient, 3 = texture, 4 = hatch)
•Primary color, integer
•Primary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Secondary color, integer
•Secondary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Gradient type, integer (1 = linear, 2 = rectangle)
•Gradient mode, integer (0 = horizontal, 1 = vertical, 2 = forward diagonal, 3 = backward diagonal)
•Texture wrap mode, integer (0 = tile, 1 = tile flip X, 2 = tile flip Y, 3 = tile flip XY, 4 = clamp)
•Hatch style, integer (0-52)
Contents of the FillGraphicalProperties array depends on the style. For transparent fills, only primary transparency is included. For solid fills, both primary color settings are included. For gradients the array contains both primary and secondary color settings as well as gradient settings. For textures there are primary color settings and texture wrap mode included, but the actual texture is not available. For hatch fill style there are both primary and secondary color settings as well as hatch style setting. In case the value is below the accepted range, the minimum value is use. Similarly the maximum value is used for values above the accepted range.
InGroups, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
InstancesInGroup, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to the model (the ID can be fetched e.g. by calling PGModel.GetActive with the PROCESSMODEL parameter):
FeedbackEmailAddress, string
IsUseLog, boolean
IsForceExclusive, boolean
ModelingOptions, blob
IsPublished, boolean
AutomaticInformationItemRefresh, int
FullId refers to a resource:
ResourceType, int
AmountOfresourceAvailable, double
UnitCost, double
UnitName, string
MaximumAmountInStore, double
OrderingLimit, double
IncrementPerRegularOrder, double
RegularOrderInterval, date
IncrementPerOrder, double
OrderingCost, double
OrderingTime, date
TimeUnit, int
ObjectsUsing, array
OrganizationUnit, id
ResponsibleOfFlows, array
ProcessLevel, array
FullId refers to a store:
StoreType, int
SimulationRules, array
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
FillGraphicalProperties, array with the following columns:
•Style, integer (0 = transparent, 1 = solid, 2 = gradient, 3 = texture, 4 = hatch)
•Primary color, integer
•Primary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Secondary color, integer
•Secondary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Gradient type, integer (1 = linear, 2 = rectangle)
•Gradient mode, integer (0 = horizontal, 1 = vertical, 2 = forward diagonal, 3 = backward diagonal)
•Texture wrap mode, integer (0 = tile, 1 = tile flip X, 2 = tile flip Y, 3 = tile flip XY, 4 = clamp)
•Hatch style, integer (0-52)
Contents of the FillGraphicalProperties array depends on the style. For transparent fills, only primary transparency is included. For solid fills, both primary color settings are included. For gradients the array contains both primary and secondary color settings as well as gradient settings. For textures there are primary color settings and texture wrap mode included, but the actual texture is not available. For hatch fill style there are both primary and secondary color settings as well as hatch style setting. In case the value is below the accepted range, the minimum value is use. Similarly the maximum value is used for values above the accepted range.
Instance related properties: ElementHeight (int), ElementWidth(int), ElementPosX(int), ElementPosY(int)
InGroups, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
InstancesInGroup, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to a group:
ElementTypeId, id
Name, string
Description, string
InGroups, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
InstancesInGroup, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
FullId refers to an information item:
ModelObjects, array
Flows, array
Links, array
IsEmbedded, boolean
EmbeddedInformation, blob
DocumentType, int
ChildInformationItems, array
ParentInformationItems, array
FlowCompositions, array
ElementID refers to a checkpoint:
Id, id
ProcessLevel, id
Name, string
InstanceGraphicalProperties, array
ElementID refers to a text item:
Id, id
ProcessLevel, id
Name, string
InstanceGraphicalProperties, array
ElementID refers to a picture:
Id, id
ProcessLevel, id
Name, string
InstanceGraphicalProperties, array
PictureFileName, string. Path to the image to use with the picture element.
FullId refers to a custom element:
Owner, id
SimulationEntryRule, int
SimulationExitRule, int
ProcessingTimeType, int
InputFrequencyType, int
MaxInputs, int
ModelingDirection, int
LineGraphicalProperties, array with the following columns:
•Width, integer
•Color, integer
•Transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Dash style, integer (0 = solid, 1 = dash, 2 = dot, 3 = dash dot, 4 = dash dot dot, 5 = custom)
•Custom dash pattern, string. Valid when dash style = 5. A valid definition contains an even amount of space-separated values ranging from 0 to 99. The first value in a value pair defines the amount of pixels that are drawn and the second one the amount of pixels that are left empty in the line.
FillGraphicalProperties, array with the following columns:
•Style, integer (0 = transparent, 1 = solid, 2 = gradient, 3 = texture, 4 = hatch)
•Primary color, integer
•Primary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Secondary color, integer
•Secondary color transparency, integer (0-255, 0 = fully transparent, 255 = opaque)
•Gradient type, integer (1 = linear, 2 = rectangle)
•Gradient mode, integer (0 = horizontal, 1 = vertical, 2 = forward diagonal, 3 = backward diagonal)
•Texture wrap mode, integer (0 = tile, 1 = tile flip X, 2 = tile flip Y, 3 = tile flip XY, 4 = clamp)
•Hatch style, integer (0-52)
Contents of the FillGraphicalProperties array depends on the style. For transparent fills, only primary transparency is included. For solid fills, both primary color settings are included. For gradients the array contains both primary and secondary color settings as well as gradient settings. For textures there are primary color settings and texture wrap mode included, but the actual texture is not available. For hatch fill style there are both primary and secondary color settings as well as hatch style setting. In case the value is below the accepted range, the minimum value is use. Similarly the maximum value is used for values above the accepted range.
Instance related properties: ElementHeight (int), ElementWidth(int), ElementPosX(int), ElementPosY(int)
InGroups, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
InstancesInGroup, array with two columns: object ID and instance ID. Setting this property doesn't force graphical presentation, i.e. if the elements are not overlapping on a diagram so that group properties would be valid, SetProperty will set the relation but it will be cleared by model validation. However, if there are group relations that are set by grouping, those values are set as expected and will not be cleared by model validation.
ZOrder, int. The z-order of the instance. Value 0 or a smaller value sets the instance to bottommost. A value equal to or greater than the number of items in the diagram moves the instance to topmost. A value in between moves the instance to selected depth-position.
DiagramTypeGroup, string. Sets the Type Group for diagram element by Type Group symbol. If the Type Group symbol is empty or an empty string, sets the element type's default. This property is supported only for diagram type process steps and element types.
Font, a one dimensional array:
•font name, string. The name of the font. Empty value ("") means that the font name is not changed, and in case of a newly created element, the default font of the element type is used.
•font size, int. Size of the font in points.Empty value ("") means that the font size is not changed, and with newly created element, the default font size of the element type is used.
•font style, a comma-separated list of enumerated values of font style: "" | "plain" | "bold" | "italic" | "underline". Empty string ("") means that the font style is not set/changed. "Plain" must be used without other enumerations and it means no font style. "Bold" | "italic" | "underline" can be listed in any combination e.g. "bold,italic". Order of enumerations is free, e.g. "italic,bold" is also supported.
•font color, int. Empty value ("") means that the font color is not changed.
•font alignment, a comma-separated list of enumerated value pairs: "top" | "middle" | "bottom" and "left" | "center" | "right", e.g. "bottom,left". Empty string ("") means that font aligment is not set/changed.
+ all custom attribute types defined for each type. To refer to member attributes in attribute sets or enumerations, use the extended naming with the following syntax: <attribute set / enumeration>, for example EventType.Start
The value for an External model type custom attribute pointing to a server model should be a string following this syntax: 8000:<ModelId>:<ProcessLevelId>:<Path>:<ProcessLevelPath (can be left empty)>/ (for example: 8000:1265506417:0:\\localhost\Demo Models\2:/). To have the External model type custom attribute point to a file, use the path to the file, e.g. C:\Path\To\Some\File.foo.
Value: Variant. Value to be set to the attribute. Note that if ExtendedPropertyName refers to an enumerated custom attribute, a valid enumerated string must be passed as the Value parameter.
When setting array values (usually relations to other objects), do not set the whole array at once. Check which values must be added and removed from the original values and use the Add/Remove methods to set the values. However, some array values must be set as whole arrays (the order of the values is important). These include:
•EntryRules and ExitRules in Process Steps and Stores
•ProcessingTimes and InputFrequencies in Proces Steps and Flows
Required Rights:
Administrator or model administrator.
Return Values:
Below are listed the return values that this function can return:
RV_SUCCESS
RV_INVALID_PARAMETER
RV_PROPERTY_NOT_FOUND
RV_CANNOT_SET_PROPERTY
RV_APPLICATION_QUIT_CALLED
RV_MODEL_NOT_OPEN
RV_ELEMENT_NOT_FOUND
RV_INVALID_SYMBOL
RV_ACCESS_DENIED
RV_UNKNOWN_ERROR
RV_FUNCTION_CANNOT_BE_USED_IN_VALIDATION_SCRIPT
Example Procedure:
iResult = PGModel.SetProperty(12345, "Description", "Description text")