VS:ObjVolume: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
(No difference)
|
Latest revision as of 14:35, 12 August 2013
.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix
Description
Function ObjVolume calculates the volume of the referenced solid object. The function supports only valid solids objects.
FUNCTION ObjVolume(
solidObject :HANDLE) : REAL;
def vs.ObjVolume(solidObject): return REAL
Parameters
solidObject HANDLE Handle to solids object.
Remarks
Calculates the volume of the given object if a valid solid.
Apparently this command is replacing CalcVolume. It should be noted that ObjVolume returns the volume in volume units from the Units dialog. CalcVolume returns the volume in length units cubed.
Example
VectorScript
PROCEDURE Example; VAR volume, area: REAL; BEGIN IF FSActLayer <> NIL THEN BEGIN volume := CalcVolume(FSActLayer); area := CalcSurfaceArea(FSActLayer); Message('Volume ', volume, ', surface area ', area); END; END; RUN(Example);
Python
Version
Availability: from VectorWorks12.5