Function Name2Index returns the internal index number for the specified object.
FUNCTION Name2Index(name : STRING): LONGINT;def vs.Name2Index(name):
return LONGINT| Name | Type | Description |
|---|---|---|
| name | STRING | Name of object. |
Returns the internal index for the object associated with the specified name.
(Joel Sciamma 2006.08.11): If the name does not exist, Name2Index returns zero.
NameIndex := Name2Index('objectName');BEGIN
IF IsTextureableObject(hobj) THEN BEGIN
IF Name2Index(ClassName) = 0 THEN BEGIN
activeClName:= ActiveClass;
NameClass(ClassName);
NameClass(activeClName);
END;
BEGIN
GetActualClassID := Name2Index( cppdIn.strClassActualName );
END;
localarchMaterialNameID := GetRField (gPluginH, gPluginName, 'ArchCompMaterialID');
localstructMaterialNameID := GetRField (gPluginH, gPluginName, 'StructCompMaterialID');
archMaterialIDNum := Name2Index(localarchMaterialNameID);
structMaterialIDNum := Name2Index(localstructMaterialNameID);result = vs.Name2Index('Example')VS Functions: SetSkylight | CreateSkylight | AddCavity
Availability: from VectorWorks 8.0