Returns the volume of the object having the specified material.
FUNCTION GetMaterialVolume(
h : HANDLE;
material : STRING): REAL;def vs.GetMaterialVolume(h, material):
return REAL| Name | Type | Description |
|---|---|---|
| h | HANDLE | Handle to the object. |
| material | STRING | Name of material. |
resultVal := GetMaterialVolume(h, 'Example');import vs
# Returns the volume of the object having the specified material.
h = vs.FSActLayer() # handle to the first selected object on the active layer
material = 'Example'
vol = vs.GetMaterialVolume(h, material)
vs.Message('GetMaterialVolume returned: ' + str(vol))Availability: from Vectorworks 2021