Description This subroutine performs an entity scaling operation equivalent to the functionality found in the GUI by right mouse clicking on a node in the object tree. The scaling operates hierarchically such that the descendants of the supplied node are also scaled. Scaling applies to both the spatial parameters of the entity definition (i.e. surface shape parameters) as well as the entity position/orientation operations.
Syntax ScaleEntity( entNode, scaleFactor )
Parameters entNode As Long Node number of the entity that the scaling operation is being applied to. Descendants of this entity are also scaled.
scaleFactor As Double Scale factor being applied to entNode.
Example The example below demonstrates how to retrieve the radius from an element primitive sphere before and after using the ScaleEntity command on the object.
Sub Main
'Sphere node being queried Dim sphereNode As Long sphereNode = FindFullName( "Geometry.Sphere" )
'Radius of the sphere Dim radius As Double radius = ElemGetParmValue( sphereNode, 0 ) Print "Sphere radius = " & radius
'Scale the entity Dim sf As Double sf = 5.0 Print "Applying scale factor of " & sf ScaleEntity( sphereNode, sf ) Update
'Retrieve the scaled radius radius = ElemGetParmValue( sphereNode, 0 ) Print "Scaled sphere radius = " & radius
End Sub
See Also
|