-
Website
http://www.solidsmack.com/ -
Original page
http://www.solidsmack.com/solidworks-tip-assembly-mate-macros/2008-09-15/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Charles Culp
39 comments · 3 points
-
JeffMirisola
20 comments · 3 points
-
bcourter
22 comments · 2 points
-
MatthewWest
32 comments · 2 points
-
Bruce Buck
78 comments · 7 points
-
-
Popular Threads
-
SolidWorks 1-upin’s AutoDesk on Conference Keynote. James Cameron Headlining #SWW10
2 days ago · 8 comments
-
Where Can You Score a Sweet SolidWorks Rig? SolidBox.
6 days ago · 10 comments
-
Flattening a Non-linear Conical Surface in SolidWorks. Is it Possible?
1 week ago · 12 comments
-
Grabba Your Cadda! Outsource Your Design Idea in One Minute with GrabCAD
1 day ago · 1 comment
-
The Beet Smack, Ninja Attack to Reorient Parts in SolidWorks
2 weeks ago · 18 comments
-
SolidWorks 1-upin’s AutoDesk on Conference Keynote. James Cameron Headlining #SWW10
-Select the top edge of the hole and an edge of the underside of the fastener (ie: the annulus)
-Run the macro, which assigns a concentric, coincident, and parallel mate, fully defining the fastener.
Now THAT would be tremendously useful. I'd write it myself, but I'm up to my eyeballs in paperwork right now. =/
My favorite macro, and the only one I really use, is one that toggles between selecting hidden lines and not. During normal use I have this one turned off. When I need to mate to an internal edge or make a line in an in context sketch line up with an existing feature I switch to wireframe mode and toggle this macro. I kludged this one together from other peoples work, but the final product is better than the sum of its parts. Instead of having one macro to turn the option on and another to turn it off this macro toggles between the two states. It also lets you know whats going on by giving feedback in the system tray.
Feast your eyes on it here: http://uberthin.com/hosted/solidworks/hidden_li...
There have been some days when my monitor almost looked like the one in the post.
He has 2 sections listed on the left for macros
Also, Lorono's SW resources: http://sw.fcsuper.com/index.php?name=UpDownload
Matt Lombard's: http://mysite.verizon.net/mjlombard/macros.html
I believe I pulled mine from Matt Lombard's site. Enjoy!
Thanks for the assistance but i still dont seem to be able to do get it to work. Can you recommend somewhere i can learn more how macros work?
Lenny is a SW god at this stuff
Here is what the "record" writes, but when I run it, it doesnt work.
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
boolstatus = Part.Extension.SelectByID2("part1@assem1", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0)
Part.CompConfigProperties4 2, 0, True, "config1", False
Part.ClearSelection2 True
boolstatus = Part.EditRebuild3
End Sub
Part.CompConfigProperties4 2, 0, True, "config1", False
It should be:
Part.CompConfigProperties4 2, 0, True, True, "config1", False