Message 1 of 3
Volume format

Not applicable
06-08-2006
12:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI,everyone.
How can i format the volume of the code bellow to be displayed in mm^3 and m^3 ?
Public Sub GetPartMassProps()
' Set a reference to the part document.
' This assumes a part document is active.
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
' Set a reference to the mass properties object.
Dim oMassProps As MassProperties
Set oMassProps = oPartDoc.ComponentDefinition.MassProperties
' Set the accuracy to medium.
oMassProps.Accuracy = k_Medium
MsgBox "Volume: " & oMassProps.Volume
end sub
Thanks.
How can i format the volume of the code bellow to be displayed in mm^3 and m^3 ?
Public Sub GetPartMassProps()
' Set a reference to the part document.
' This assumes a part document is active.
Dim oPartDoc As PartDocument
Set oPartDoc = ThisApplication.ActiveDocument
' Set a reference to the mass properties object.
Dim oMassProps As MassProperties
Set oMassProps = oPartDoc.ComponentDefinition.MassProperties
' Set the accuracy to medium.
oMassProps.Accuracy = k_Medium
MsgBox "Volume: " & oMassProps.Volume
end sub
Thanks.