Measurable (Object)

The interface to access a CATIAMeasurable Get measurements on the object.

Two types of measurement can be done:

Methods on VOLUME : GetVolume GetArea GetCOG Methods on SURFACE : GetArea GetCOG GetPerimeter Methods on PLANE : GetArea GetCOG GetPlane Methods on CYLINDER : GetArea GetCOG GetAxis GetPointsOnAxis GetRadius Methods on CONE : GetArea GetCOG GetAxis GetPointsOnAxis GetAngle Methods on SPHERE : GetArea GetCOG GetRadius GetCenter Methods on CURVE : GetLength GetCOG GetPointsOnCurve Methods on LINE : GetLength GetCOG GetPointsOnCurve GetDirection Methods on CIRCLE : GetLength GetCOG GetPointsOnCurve GetRadius GetCenter GetAngle GetAxis Methods on POINT : GetPoint Methods on AXIS SYST : GetAxisSystem

Properties


Property Angle() As (Read Only)
Returns the Angle of a circle or cone.
Example:
    This example retrieves the Angle of NewMeasurable measure.
    
    Dim AAngle As double
    AAngle = NewMeasurable.Angle
    
Property Area() As (Read Only)
Returns the area of the surface or wet area from volume.
Example:
    This example retrieves the area of NewMeasurable measure.
    The area unit given by oArea is mē
    
    Dim AArea As double
    AArea = NewMeasurable.Area
    
Property GeometryName() As (Read Only)
Returns the name of the geometry of the measured object.
Example:
    This example retrieves the name of the geometry of the NewMeasurable measure.
    
    Dim AGeometryName As CatMeasurableName
    AGeometryName = NewMeasurable.GeometryName
    
Property Length() As (Read Only)
Returns the Length of a curve.
Example:
    This example retrieves the Length of NewMeasurable measure.
    
    Dim ALength As double
    ALength = NewMeasurable.Length
    
Property Perimeter() As (Read Only)
Returns the perimeter of a surface.
Example:
    This example retrieves the perimeter of NewMeasurable measure.
    
    Dim APerimeter As double
    APerimeter = NewMeasurable.Perimeter
    
Property Radius() As (Read Only)
Returns the radius of an arc, cylinder or sphere.
Example:
    This example retrieves the Radius of NewMeasurable measure.
    
    Dim ARadius As double
    ARadius = NewMeasurable.Radius
    
Property Volume() As (Read Only)
Returns the volume.
Example:
    This example retrieves the volume of NewMeasurable measure.
    The volume unit given by oVolume is m^3
    
    Dim AVolume As double
    AVolume = NewMeasurable.Volume
    

Methods


Func GetAngleBetween( iMeasuredItem) As
Compute the angle between the CATIAMeasurable and another. Instantiate Measurable with method GetMeasurable to get the correct result.
Example:
    This example retrieves the angle between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object2)
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)
    Dim Angle As double
    Angle = TheMeasurable.GetAngleBetween(reference2)
    
Func GetAngleBetweenInContext( iMeasuredItem, iProductInstance) As
Compute the angle between the CATIAMeasurable and another with respect to the provided context (ProductInstance). Instantiate Measurable with method GetMeasurableInContext to get the correct result.
Example:
    This example retrieves the angle between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
	 Dim ProductInstances As VPMInstance
    Set ProductInstances = "GetTheProductInstance"
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object1)
	 Dim ProductInstances2 As VPMInstance
    Set ProductInstances2 = "GetTheProductInstance"
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1,ProductInstances)
    Dim AngleInContext As double
    AngleInContext = TheMeasurable.GetAngleBetween(reference2,ProductInstances2)
    
Sub GetAxis( oAxisVector)
Retrieves the axis vector of the cylinder or a cone.
Parameters:
oVector
If the measurable is instantiated with GetMeasurable, the axis vector of the cylinder or a cone will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the axis vector of the cylinder or a cone will be with respect to the provided context (ProductInstance).
  • oAxisVector(0) is the X direction
  • oAxisVector(1) is the Y direction
  • oAxisVector(2) is the Z direction
Example:
    This example retrieves the axis vector of the cylinder or a cone of NewMeasurable measure.
    
    Dim AxisVector (2)
    NewMeasurable.GetAxis AxisVector
    
Sub GetAxisSystem( oComponents)
Retrieves the information of the axis system.
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the information of the axis system will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the information of the axis system will be with respect to the provided context (ProductInstance).
  • oComponents(0) is the X coordinate of the origin of the axis system
  • oComponents(1) is the Y coordinate of the origin of the axis system
  • oComponents(2) is the Z coordinate of the origin of the axis system
  • oComponents(3) is the X coordinate of the first direction of the axis system
  • oComponents(4) is the Y coordinate of the first direction of the axis system
  • oComponents(5) is the Z coordinate of the first direction of the axis system
  • oComponents(6) is the X coordinate of the second direction of the axis system
  • oComponents(7) is the Y coordinate of the second direction of the axis system
  • oComponents(8) is the Z coordinate of the second direction of the axis system
  • oComponents(9) is the X coordinate of the third direction of the axis system
  • oComponents(10) is the Y coordinate of the third direction of the axis system
  • oComponents(11) is the Z coordinate of the third direction of the axis system
Example:
    This example retrieves information of the axis system of NewMeasurable measure.
    
    Dim Components (11)
    NewMeasurable.GetAxisSystem Components
    
Sub GetCOG( oCoordinates)
Retrieves the position of the center of gravity of a surface and volume .
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the position of the center of gravity will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the position of the center of gravity will be with respect to the provided context (ProductInstance).
  • oCoordinates(0) is the X coordinate
  • oCoordinates(1) is the Y coordinate
  • oCoordinates(2) is the Z coordinate
Example:
    This example retrieves the position of the center of gravity of NewMeasurable measure.
    
    Dim Coordinates (2)
    NewMeasurable.GetCOG Coordinates
    
Sub GetCenter( oCoordinates)
Retrieves the position of the center of a circle or sphere.
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the position of the center will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the position of the center will be with respect to the provided context (ProductInstance).
  • oCoordinates(0) is the X coordinate
  • oCoordinates(1) is the Y coordinate
  • oCoordinates(2) is the Z coordinate
Example:
    This example retrieves the position of the center of NewMeasurable measure.
    
    Dim Coordinates (2)
    NewMeasurable.GetCOGPosition Coordinates
    
Sub GetDirection( oDirection)
Retrieves the direction of the line.
Parameters:
oDirection
If the measurable is instantiated with GetMeasurable, the direction of the line will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the direction of the line will be with respect to the provided context (ProductInstance).
  • oDirection(0) is the X direction
  • oDirection(1) is the Y direction
  • oDirection(2) is the Z direction
Example:
    This example retrieves the direction of the line of NewMeasurable measure.
    
    Dim Direction (2)
    NewMeasurable.GetDirection Direction
    
Func GetMinimumDistance( iMeasuredItem) As
Compute the minimum distance between the CATIAMeasurable and another. Bodies (openbody, hybridbody..) cannot be measured between. Instantiate Measurable with method GetMeasurable to get the correct result.
Example:
    This example retrieves the distance between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object2)
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)
    Dim MinimumDistance As double
    MinimumDistance = TheMeasurable.GetMinimumDistance(reference2)
    
Func GetMinimumDistanceInContext( iMeasuredItem, iProductInstance) As
Compute the minimum distance between the CATIAMeasurable and another Bodies with respect to the provided context (ProductInstance) Instantiate Measurable with method GetMeasurableInContext to get the correct result.
Example:
    This example retrieves the distance between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
	 Dim ProductInstances As VPMInstance
    Set ProductInstances = "GetTheProductInstance"
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object2)
	 Dim ProductInstances2 As VPMInstance
    Set ProductInstances2 = "GetTheProductInstance"
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurableInContext(reference1,ProductInstances)
    Dim MinimumDistanceInContext As double
    MinimumDistanceInContext = TheMeasurable.GetMinimumDistanceInContext(reference2,ProductInstances2)
    
Sub GetMinimumDistancePoints( iMeasuredItem, oCoordinates)
Compute the points corresponding to the minimum distance between the two references. Instantiate Measurable with method GetMeasurable to get the correct result.
Example:
    This example retrieves the points corresponding to the distance between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object2)
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1)
    Dim Coordinates (8)
    TheMeasurable.GetMinimumDistancePoints reference2, Coordinates
    
Sub GetMinimumDistancePointsInContext( iMeasuredItem, iProductInstance, oCoordinates)
Compute the points corresponding to the minimum distance between the two references with respect to the provided context (ProductInstance). Instantiate Measurable with method GetMeasurableInContext to get the correct result.
Example:
    This example retrieves the points corresponding to the distance between the reference1 and reference2.
    Dim reference1 As Reference
    Set reference1 = part1.CreateReferenceFromObject(object1)
	 Dim ProductInstances As VPMInstance
    Set ProductInstances = "GetTheProductInstance"
    Dim reference2 As Reference
    Set reference2 = part1.CreateReferenceFromObject(object2)
	 Dim ProductInstances2 As VPMInstance
    Set ProductInstances2 = "GetTheProductInstance"
    Dim TheSPAWorkbench As Workbench
    Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
    Dim TheMeasurable As Measurable
    Set TheMeasurable = TheSPAWorkbench.GetMeasurableInContext(reference1,ProductInstances)
    Dim CoordinatesInContext (8)
    TheMeasurable.GetMinimumDistancePointsInContext reference2,ProductInstances2, CoordinatesInContext
    
Sub GetPlane( oComponents)
Retrieves informations of the plane.
Parameters:
oComponents
If the measurable is instantiated with GetMeasurable, the informations of the plane will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the informations of the plane will be with respect to the provided context (ProductInstance).
  • oComponents(0) is the X coordinate of the origin
  • oComponents(1) is the Y coordinate of the origin
  • oComponents(2) is the Z coordinate of the origin
  • oComponents(3) is the X coordinate of the first direction of the plane
  • oComponents(4) is the Y coordinate of the first direction of the plane
  • oComponents(5) is the Z coordinate of the first direction of the plane
  • oComponents(6) is the X coordinate of the second direction of the plane
  • oComponents(7) is the Y coordinate of the second direction of the plane
  • oComponents(8) is the Z coordinate of the second direction of the plane
Example:
    This example retrieves informations of the plane of NewMeasurable measure.
    
    Dim Components (2)
    NewMeasurable.GetPlane Components
    
Sub GetPoint( oCoordinates)
Retrieves the position of the point.
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the coordinate of the point will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the coordinate of the point will be with respect to the provided context (ProductInstance).
  • oCoordinates(0) is the X coordinate
  • oCoordinates(1) is the Y coordinate
  • oCoordinates(2) is the Z coordinate
Example:
    This example retrieves the coordinate of the point of NewMeasurable measure.
    
    Dim Coordinates (2)
    NewMeasurable.GetPoint Coordinates
    
Sub GetPointsOnAxis( oCoordinates)
Retrieves the the characteristic points of the axis with respect of the size of the revolution object.
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the information of the characteristic points will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the information of the characteristic points will be with respect to the provided context (ProductInstance).
  • oCoordinates(0) is the X coordinate of the centerpoint of the axis
  • oCoordinates(1) is the Y coordinate of the centerpoint of the axis
  • oCoordinates(2) is the Z coordinate of the centerpoint of the axis
  • oCoordinates(3) is the X coordinate of the startpoint of the axis
  • oCoordinates(4) is the Y coordinate of the startpoint of the axis
  • oCoordinates(5) is the Z coordinate of the startpoint of the axis
  • oCoordinates(6) is the X coordinate of the endpoint of the axis
  • oCoordinates(7) is the Y coordinate of the endpoint of the axis
  • oCoordinates(8) is the Z coordinate of the endpoint of the axis
Example:
    This example retrieves the characteristic points of the axis of NewMeasurable measure.
    
    Dim Coordinates (8)
    NewMeasurable.GetPointsOnAxis Coordinates
    
Sub GetPointsOnCurve( oCoordinates)
Retrieves the the characteristic points of the curve : the start point, the middle point and the end point.
Parameters:
oCoordinates
If the measurable is instantiated with GetMeasurable, the information of the characteristic points of the curve will be with respect to the local coordinate system If the measurable is instantiated with GetMeasurableInContext, the information of the characteristic points of the curve will be with respect to the provided context (ProductInstance).
  • oCoordinates(0) is the X coordinate of the startpoint of the curve
  • oCoordinates(1) is the Y coordinate of the startpoint of the curve
  • oCoordinates(2) is the Z coordinate of the startpoint of the curve
  • oCoordinates(3) is the X coordinate of the midpoint of the curve
  • oCoordinates(4) is the Y coordinate of the midpoint of the curve
  • oCoordinates(5) is the Z coordinate of the midpoint of the curve
  • oCoordinates(6) is the X coordinate of the endpoint of the curve
  • oCoordinates(7) is the Y coordinate of the endpoint of the curve
  • oCoordinates(8) is the Z coordinate of the endpoint of the curve
Example:
    This example retrieves the characteristic points of the curve of NewMeasurable measure.
    
    Dim Coordinates (8)
    NewMeasurable.GetPointsOnCurve Coordinates