Hi,
Is there any way to apply this functionality in a VBA macro?
This updates all the default views based on the current view and selection. Recording a macro does not pick this action up.
Many thanks.
SolidworksApi macros
Hi,
Is there any way to apply this functionality in a VBA macro?
This updates all the default views based on the current view and selection. Recording a macro does not pick this action up.
Many thanks.
SolidworksApi macros
Chris,
Typically if you can't record a simple command like this with a macro then you will want to look in ISldWorks::RunCommand. Try this out:
Dim swApp As SldWorks.SldWorks
Sub main()
Set swApp = Application.SldWorks
swApp.RunCommand swCommands_Update_Std_View, "test"
End Sub
Hope this helps.
Keith
Video Tutorials for the SolidWorks API
Hi Keith,
Thanks again for your continued help! This time, however, things were a little bit cryptic. I tried that code but couldn't see how it worked. Google didn't turn up any examples using swCommands_Update_Std_View, and other examples of swApp.RunCommand didn't help much either.
So I've just signed up for your "Video Tutorials for the SolidWorks API" course. I've watched some of the free content and am looking forward to getting up to speed on the more advanced stuff.
Thanks again,
Chris
Did you ever find out how to do this? I'm needing the same funtionality and just can't figure it out.
This is not yet implemented in the API. There is an open enhancement SPR 539534 "Would like an API for the "Update Standard Views" command in the Orientation page". If you have a service subscription, please email apisupport@solidworks.com and asked to be attached to that SPR to give it more visibility.