.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
DescriptionFunction ResolveByClassTextureRef returns the internal index, or name, of the texture assigned to the referenced object.
Primary, secondary, or tertiary texture assignments can be returned for objects that support multiple textures, such as roofs or walls. For objects that do not support multiple textures, pass 0 to the partID parameter.
partID :INTEGER) : LONGINT;
def vs.ResolveByClassTextureRef(obj, partID): return LONGINT
obj HANDLE Handle to object. partID INTEGER Primary, secondary, or tertiary texture ID to be returned.
RemarksIf the texture ref for an object is set to -1, it will use the texture of its class. This routine will look up the object's class and return the class' texture ref.
Julian Carr [25 April 2014]: I don't believe this works as described. If you create an extrude, put it in a class that has a texture applied in the Other tab, then run this code:
it will only return a value if the selected extrude has the Texture popup set to Class Texture in the OIP. Otherwise it returns 0. It does not apply the class texture to the object
textureID := ResolveByClassTextureRef(handleToObject, 0);
VersionAvailability: from VectorWorks 8.0
See AlsoVS Functions: