Eng-Tips is the largest forum for Engineering Professionals on the Internet.

Members share and learn making Eng-Tips Forums the best source of engineering information on the Internet!

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

Bounding Box macro

Status
Not open for further replies.

mdraikar

Mechanical
Joined
Dec 3, 2024
Messages
2
Hello ,

I copied the bounding box macro and did some changes but it fails in bbox line ,
Please help me in correcting this, ( Example in part if the value comes as Bbox_dx.1 or .2 or .3 or .4 it should automatically find and give results)
'____________________________________________________
Dim catDoc As PartDocument
Dim catPart As Part

Set catDoc=CATIA.ActiveDocument
Set catPart=catDoc.Part

Dim Bbox_dx As String
Bbox_dx=catPart.Parameters.Item("Bbox_dx.2").ValueAsString

Dim Bbox_dy As String
Bbox_dy=catPart.Parameters.Item("Bbox_dy.2").ValueAsString

Dim Bbox_dz As String
Bbox_dz=catPart.Parameters.Item("Bbox_dz.2").ValueAsString

MsgBox "Overall Dimensions of part :" & _
vbCrLf & "Length =" & Bbox_dx & _
vbCrLf & "Width =" & Bbox_dy & _
vbCrLf & "Height =" & Bbox_dz


End Sub
 
From where did you copy? Are you working on hybrid or non-hybrid mode?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top