×
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 Help???

Macro Help???

Macro Help???

(OP)
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

RE: Macro Help???

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.

batHonesty may be the best policy, but insanity is a better defense.bat
http://www.EsoxRepublic.com-SolidWorks API VB programming help

RE: Macro Help???

(OP)
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

RE: Macro Help???

CODE

Public Sub InitValues()
OKFlag = False
SelectSum = 0
cmdSelectAll_Click
'add code to uncheck origin checkbox here
Me.Show
End Sub 

RE: Macro Help???

CODE

ExitStrategy:
'add code to hide origins in view menu here
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 

batHonesty may be the best policy, but insanity is a better defense.bat
http://www.EsoxRepublic.com-SolidWorks API VB programming help

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