Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro to Build Assembly using Mate References

Status
Not open for further replies.

griffinb

Mechanical
Mar 22, 2011
2
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?
 
Replies continue below

Recommended for you

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
 
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor