×
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

Finding parts (or products) involved in a constraint

Finding parts (or products) involved in a constraint

Finding parts (or products) involved in a constraint

(OP)
Hello,

I'm working with CATIA V6 and I have a main assembly made of parts and subassemblies. Those parts and subassemblies are linked together by revolute joints.

Does anyone know how I could write a macro to find the name of the parts or subassemblies involved in a particular joint?

I took a look at this post, (which I'm still not able to replicate in V6): http://www.coe.org/p/fo/st/topic=113&post=6717...

For example;

CODE --> VB

Dim MyMechRep As KinMechanism

Set MyMechRep = MyRep.GetItem("MECHRep")

Dim MyJoints As KinJoints

Set MyJoints = MyMechRep.Joints

TmpSel.Add MyJoints.Item(1)

Dim AReference As Reference

For i = 1 To MyJoints.Count Step 1

    Dim MyJoint As EngConnection

    Set MyJoint = MyJoints.Item(i)

    If (MyJoint.Type = 8 Or MyJoint.Type = 0) Then ' This means we have detected a revolute Joint

        MsgBox "We have detected a revolute joint!"

        Dim ListOfAssemblyConstraints As AssemblyConstraints

        Dim AConstraint As AssemblyConstraint

        Set ListOfAssemblyConstraints = MyJoint.AssemblyConstraints

        MsgBox ListOfAssemblyConstraints.Count

        For zz = 1 To ListOfAssemblyConstraints.Count Step 1

            Set AConstraint = ListOfAssemblyConstraints.Item(zz)

            MsgBox "Name : " & AConstraint.Name & "Nb of Options: " & AConstraint.GetNbOptions & "Nb of values: " & AConstraint.GetNbValues

        Next

    End If

Next 


With this code I'm able to know the name of the constraint and a lot more information, but I cannot know what part(s) or subassemblies are involved in the constraints...

Does anyone know how I could achieve that?

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