Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Macro Help???

Status
Not open for further replies.

Ebbie22

Mechanical
Oct 24, 2007
29
I found a macro sometime last year that hides/blanks out Planes, Sketches, etc in the model tree (Correct Location) instead of turning those features off in the View Menu. This macro works great but after awhile, I noticed the hiding the Origin in the model tree wasn't a good idea/option. I really don't know much about making macro's but I was able to delete the origin option from the macro. I guess what I'm really looking for is to leave all the other options as is but instead of hiding the origin in the model tree it would hide from the View Menu instead.

Thanks,
Todd
 
Replies continue below

Recommended for you

You could change the initializing routine so that the origin selection is unchecked during the setup. Then add code to the end of the routine to blank origins in the view menu.

For your own use, you can change this code any way you wish. However, I do not sanction any redistribution of alterations of my original work.

[bat]Honesty may be the best policy, but insanity is a better defense.[bat]
-SolidWorks API VB programming help
 
Correct, this is for my own use. Just needed some guidance on where to even start! I will make an attempt to update as suggested. Thanks
 
Code:
Public Sub InitValues()
OKFlag = False
SelectSum = 0
cmdSelectAll_Click
[highlight #8AE234]'add code to uncheck origin checkbox here[/highlight]
Me.Show
End Sub
 
Code:
ExitStrategy:
[highlight #8AE234]'add code to hide origins in view menu here[/highlight]
Set swRootComp = Nothing                 'SldWorks.Component2
Set swConf = Nothing                     'SldWorks.Configuration
Set swModel = Nothing                    'SldWorks.ModelDoc2
Set swApp = Nothing                      'SldWorks.SldWorks

EmptyCollection colCompList
EmptyCollection colComponents
EmptyCollection colFeatures

'Debug.Print "Finish " & Now
'Debug.Print
'MsgBox "Done"
End Sub

[bat]Honesty may be the best policy, but insanity is a better defense.[bat]
-SolidWorks API VB programming help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor