jistre
Mechanical
- Oct 1, 2003
- 1,147
Okay, I have here what seems to be a simple task, but for the life of me, I can't make it happen, and I can't find what I'm looking for in documentation. I'm guessing I'm just too dense to find the information and make sense of it; I'm a mechanical engineer, not a software engineer.
What I'm looking to do is create a macro that will make a mate that makes two planes coincident. I have found many macros out there that will do exactly that given that you select two planes and fire the macro, and I use one extensively when modelling assemblies. It's a HUGE productivity booster. What I'm looking for is a bit more specialized.
I don't know if you guys have noticed, but the fasteners in the toolbox use a pretty standard scheme for naming their planes. Plane 1 and plane 2 are parallel to the "axis" of the fastener, and plane 3 is the perpendicular. When parts are automatically placed from the toolbox, 5 degrees of freedom are typically removed, leaving rotation around the "axis" free. If you take two fasteners and mate their plane 1's coincident, you lock up that last degree and make the model fully defined. I'm looking for a macro that will do this. I want to select the two fasteners that I want mated, fire the macro, and have it take the two planes named "plane 1" in each, and then add a coincident mate and close the mate property manager.
I know there's got to be a way to do it, but I'm not that fluent with the VBA interface for this program. I suspect one of you gurus out there can help me and point me in the right direction.
If you can also tell me how to make a macro collapse the feature manager tree, that'd be great too, and I'd name my firstborn after you (or perhaps something that sounds nothing like your name.)
Oh yeah,
Thanks!
What I'm looking to do is create a macro that will make a mate that makes two planes coincident. I have found many macros out there that will do exactly that given that you select two planes and fire the macro, and I use one extensively when modelling assemblies. It's a HUGE productivity booster. What I'm looking for is a bit more specialized.
I don't know if you guys have noticed, but the fasteners in the toolbox use a pretty standard scheme for naming their planes. Plane 1 and plane 2 are parallel to the "axis" of the fastener, and plane 3 is the perpendicular. When parts are automatically placed from the toolbox, 5 degrees of freedom are typically removed, leaving rotation around the "axis" free. If you take two fasteners and mate their plane 1's coincident, you lock up that last degree and make the model fully defined. I'm looking for a macro that will do this. I want to select the two fasteners that I want mated, fire the macro, and have it take the two planes named "plane 1" in each, and then add a coincident mate and close the mate property manager.
I know there's got to be a way to do it, but I'm not that fluent with the VBA interface for this program. I suspect one of you gurus out there can help me and point me in the right direction.
If you can also tell me how to make a macro collapse the feature manager tree, that'd be great too, and I'd name my firstborn after you (or perhaps something that sounds nothing like your name.)
Oh yeah,
Thanks!