×
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

Macro to Build Assembly using Mate References

Macro to Build Assembly using Mate References

Macro to Build Assembly using Mate References

(OP)
This has been asked before but did not receive a good answer... Does anyone know how you can programatically add parts to an assembly and have them get placed based on mate their references?

If the macro code isn't known, how would you do it manually? For example, say I placed a screw in an assembly but not close enough to snap to its mate reference, so it's sitting in space unfixed. Is it possible to get it to snap to the mate reference without deleting then reinserting it?

RE: Macro to Build Assembly using Mate References

You can place a part in an assembly at an arbitrary location, and progressively add references until SW snaps it into place.

... which is sort of what SW every time it rebuilds the assembly model.   Judging by its behavior, SW does not store any information about the location of components within a model.  It snaps them into position based only on their references.   Sometimes it finds 'new' ways to put the pieces together if you haven't fixed them, or restrained them uniquely.

 

Mike Halloran
Pembroke Pines, FL, USA

RE: Macro to Build Assembly using Mate References

(OP)
I have mate references with the same name in the part and in the assembly so when I manually insert the part it automatically snaps into place when my cursor hovers over the model window.

If I record a macro while doing this and try to run it again, it inserts the part but it does not get mated correctly. It just places it out in space where I clicked when recording the macro.

Any ideas on how to get it to snap into place with the macro?

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