×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Measure components of an assembly journal

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

RE: Measure components of an assembly journal

If you are using the "AskAllBodies" function found in the linked thread, you could check the layer that the body is on before adding it to the list:

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 Function 

www.nxjournaling.com

RE: Measure components of an assembly journal

(OP)
Is there a way to add this function to the program that you posted? That program already adds the values to the attributes for me.

Thanks

RE: Measure components of an assembly journal

(OP)
Thanks for the post. With only a bit of work I was able to get this going. This will be a time saver for us. Thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources