VS:GetName: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
m (1 revision)
 
m (Transfer Orso to _c_)
 
(One intermediate revision by the same user not shown)
Line 36: Line 36:
<remark>
<remark>


[[User:CBM-c-|_c_]] (2016.02.18): If the string 'none' is returned (and not 'None' as stated above) this is not localized. Checked in the German VW.
(Unsigned):
This function is a little non-intuitive. If the namestring of object h is empty, this function returns the literal string "none". I don't know what the localization implications of this are.
This function is a little non-intuitive. If the namestring of object h is empty, this function returns the literal string "none". I don't know what the localization implications of this are.



Latest revision as of 06:43, 30 December 2020

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

Description

Function GetName returns the object name of the referenced object. The function returns "None" if the object has no object name.

A handle to layer may not passed to this routine; to obtain a layer name, use GetLName.

FUNCTION GetName(
h :HANDLE) : STRING;
def vs.GetName(h):
    return STRING

Parameters

h HANDLE Handle to object.

Remarks

_c_ (2016.02.18): If the string 'none' is returned (and not 'None' as stated above) this is not localized. Checked in the German VW.

(Unsigned): This function is a little non-intuitive. If the namestring of object h is empty, this function returns the literal string "none". I don't know what the localization implications of this are.

If the name has been deleted it returns an empty string, so test for both (empty string or "none" string).

Example

VectorScript

ObjectName := GetName(HandleToObject);

Python

ObjectName = vs.GetName(vs.FSActLayer())

Version

Availability: from All Versions

See Also

VS Functions:

VS:SetName

VS Functions: [[VS:SetName]]