Measure components of an assembly journal
Measure components of an assembly journal
(OP)
Hi everyone.
I am looking for a journal that can measure the components of an assembly. The journal would need to process each component of the assembly and measure the solid body found on layer 1, obtain X, Y and Z values and assign them to the part attributes. I have found a journal that looks like it could do the job in thread561-389240: AskBoundingBox Function written by cowski. I would like to change the solid body search to find the solid body only on layer 1. I have false bodies in the part file that I want to avoid measuring. I am not sure about how to do this.
Thanks in advance
I am looking for a journal that can measure the components of an assembly. The journal would need to process each component of the assembly and measure the solid body found on layer 1, obtain X, Y and Z values and assign them to the part attributes. I have found a journal that looks like it could do the job in thread561-389240: AskBoundingBox Function written by cowski. I would like to change the solid body search to find the solid body only on layer 1. I have false bodies in the part file that I want to avoid measuring. I am not sure about how to do this.
Thanks in advance





RE: Measure components of an assembly journal
CODE
Function AskAllBodies(ByVal thePart As Part) As List(Of Body) Dim theBodies As New List(Of Body) Dim aBodyTag As Tag = Tag.Null Do theUfSession.Obj.CycleObjsInPart(thePart.Tag, _ UFConstants.UF_solid_type, aBodyTag) If aBodyTag = Tag.Null Then Exit Do End If Dim theType As Integer, theSubtype As Integer theUfSession.Obj.AskTypeAndSubtype(aBodyTag, theType, theSubtype) If theSubtype = UFConstants.UF_solid_body_subtype Then dim theBody as body = utilities.NXObjectManager.Get(aBodyTag) if theBody.Layer = 1 then theBodies.Add(theBody) end if End If Loop While True Return theBodies End Functionwww.nxjournaling.com
RE: Measure components of an assembly journal
Thanks
RE: Measure components of an assembly journal