Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 1.65 KB

File metadata and controls

66 lines (53 loc) · 1.65 KB

SetDescriptionText

Description

Sets the user-supplied description for an object.
Adds the description data node if one does not already exist.

FUNCTION SetDescriptionText(
				hObject         : HANDLE;
				descriptionText : DYNARRAY[] of CHAR): BOOLEAN;
def vs.SetDescriptionText(hObject, descriptionText):
    return BOOLEAN

Parameters

Name Type Description
hObject HANDLE Handle of the object for which the description should be set.
descriptionText DYNARRAY[] of CHAR The description text to be set for the object

Remarks

Added for T01363 to add descriptions for classes and layers.

Examples

BEGIN
	GetWSCellString (wksHand, row, col+8, tempStr);	{description}
	tempBool := SetDescriptionText (classHand, tempStr);
END;

BEGIN
	descriptionTextDyn := descriptionTextStr;
	tempBool := SetDescriptionText (sheetLayerH, descriptionTextDyn);
END;

GetDescriptionText (classHandle, tempDescTextDyn);
tempDescTextStr := tempDescTextDyn;
IF tempDescTextStr <> gClassList [i].Description THEN
	tempBool := SetDescriptionText (classHandle, gClassList [i].Description);
import vs

# Sets the user-supplied description for an object.
hObject = vs.FSActLayer()  # handle to the first selected object on the active layer
descriptionText = 'Example text'

ok = vs.SetDescriptionText(hObject, descriptionText)
if ok:
    vs.Message('SetDescriptionText succeeded')
else:
    vs.Message('SetDescriptionText failed')

See Also

VS Functions: GetDescriptionText

Version

Availability: from Vectorworks 2015

Category