Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

journal AskBoundingBox not accurate

Status
Not open for further replies.

multicaduser

Industrial
Jan 29, 2013
261
In using the following code the the results on some of the axis are inaccurate, as much as .024". Is there any way to control the accuracy and/or format (number of decimal places)?

Code:
    ufs.Modl.AskBoundingBox(solid1.Tag,bbox)  
    msgbox ("min X: " & bbox(0) & " max X: " & bbox(3) & vbcrlf _  
        & "min Y: " & bbox(1) & " max Y: " & bbox(4) & vbcrlf _  
        & "min Z: " & bbox(2) &  " max Z: " & bbox(5) & vbcrlf & vbcrlf & _  
        "X dim: " & bbox(3) - bbox(0) & vbcrlf & _  
        "Y dim: " & bbox(4) - bbox(1) & vbcrlf & _  
        "Z dim: " & bbox(5) - bbox(2), vbokonly)

NX 12.0.1.7 Windows 10
 
Replies continue below

Recommended for you

Found it, ran across ufs.Modl.AskBoundingBoxExact and it reports more accurately.

NX 12.0.1.7 Windows 10
 
Now this is curious.

lw.WriteLine("bar = " & format("%0.4f",1))

writes "bar = 1", not "bar = 1.0000"

Still searching.

NX 12.0.1.7 Windows 10
 
Murphy's law, find it just after posting.

lw.WriteLine("bar = " & 1.ToString("F4"))

NX 12.0.1.7 Windows 10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor