VS:GetDescriptionText

From Vectorworks Developer
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Retrieves any description text that exists for a specified object and passes it back in the descriptionText argument. The descriptionText argument will be empty if the object has no description text.

PROCEDURE GetDescriptionText(
hObject :HANDLE;
VAR descriptionText :DYNARRAY[] of CHAR);
def vs.GetDescriptionText(hObject):
    return descriptionText

Parameters

hObject HANDLE Handle of object for which to retrieve the text.
descriptionText DYNARRAY[] of CHAR Object's description text, if any exists.

Remarks

Added for T01363 to add descriptions for classes and layers.

Example

PROCEDURE GetDescExample;
VAR
	descriptionTextDyn	:DYNARRAY [] of CHAR;
	tempH : HANDLE;
BEGIN
	tempH := GetObject ('Dimension');

	GetDescriptionText (tempH, descriptionTextDyn);

	IF descriptionTextDyn <> ''  THEN 
		Message (descriptionTextDyn)
	ELSE
		Message ('no description');
END;
Run (GetDescExample);

Version

Availability: from Vectorworks 2015

See Also

VS Functions:

VS:SetDescriptionText

VS Functions: [[VS:SetDescriptionText]]