Function Index2Name returns the name of the object with specified index number.
FUNCTION Index2Name(index : LONGINT): STRING;def vs.Index2Name(index):
return STRING| Name | Type | Description |
|---|---|---|
| index | LONGINT | Object index number. |
Returns the name of the object with the internal index specified.
BEGIN
resHand := GetObject(Index2Name(-patID));
resType := GetTypeN(resHand);
IF (resType = 108{kTileDefNode}) OR (resType = 119{kImageDefNode}) OR (resType = 120{kGradientDefNode}) THEN
SetFPat(objHand,1);
END;
SetElement(xmlID, 'CreateJoistsFromPoly/FramingFillFore', Num2StrF(FramingFillFore));
SetElement(xmlID, 'CreateJoistsFromPoly/FramingFillBack', Num2StrF(FramingFillBack));
SetElement(xmlID, 'CreateJoistsFromPoly/FramingPenColor', Num2StrF(FramingPenColor));
IF (FramingPenLine <> 2) THEN
SetElement(xmlID, 'CreateJoistsFromPoly/FramingPenLine', Index2Name(-FramingPenLine))
ELSE
SetElement(xmlID, 'CreateJoistsFromPoly/FramingPenLine', '');
BEGIN
TempTextRef := GetTextureRef(h,0,TRUE);
ChairTexture := Index2Name(TempTextRef);
FoundTexture := TRUE;
END;import vs
# Function Index2Name returns the name of the object with specified index number.
index = 1
name = vs.Index2Name(index)
vs.Message('Index2Name returned: ' + str(name))Availability: from VectorWorks8.0