PV SET STYLE NAME
version 6.8
PV SET STYLE NAME (area; stylesheet; name)
Parameter | Type | Description | |
area | Longint | 4D View area | |
stylesheet | Longint | Stylesheet ID | |
name | String | Stylesheet name |
Description
The PV SET STYLE NAME command renames the stylesheet with the character string passed in the name parameter.
Example
This method allows you to rename a style.
C_STRING(255;$StyleName) `Name of style to rename in Area
C_STRING(255;$NewName) `New name to assign to the style in Area
ARRAY LONGINT($StyleNumArray;0) `Style numbers array
ARRAY STRING(255;$StyleNameArray;0) `Style names array
C_INTEGER($Position) `Position of the style to rename in the number and name arrays
$StyleName:="subparagraph" `We want to rename the style "subparagraph"...
$NewName:="Paragraph" `... to "Paragraph"
PV GET STYLE LIST (Area;$StyleNumArray;$StyleNameArray) `List of available styles
$Position:=Find in array($StyleNameArray;$StyleName) `Search for style to rename
If ($Position#-1) `Is the style to rename present in Area?
PV SET STYLE NAME (Area;$StyleNumArray{$Position};$NewName) `Rename it
Else
ALERT("The style '"+$StyleName+"' is not present in the area.")
End if
See Also