Update: Macros can work in LDR mode (thanks, Artem), but I could not find a way to access them from a keyboard shortcut or an icon.
One of the most useful settings when working with assemblies is Scroll Selected Item into View.
It is also the biggest factor of slow-down when selecting multiple components in a large assembly. Even in Large Design Review mode, the user productivity is destroyed if this setting is on.
I have a macro that turns this setting on or off, as the user requires, but macros do not seem to work in LDR mode.
Does anyone know of a way to get the macros to work?
SolidworksApi/macros
Hi Alin,
What error do you have? I can run the macro just fine in the LDR mode. The one below toggles off this option and just for test displays a message box.
Dim swApp As SldWorks.SldWorks
Sub main()
Set swApp = Application.SldWorks
swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swFeatureManagerEnsureVisible, False
swApp.SendMsgToUser "Test"
End Sub
Could you please try it from your end?
Thanks,
Artem
Hi Alin,
You can use . Macro and shortcuts work correctly in LDR.
Thanks,
Artem
Paste the code into Excel (with just a couple tweaks) and run it from there... :-D
Alin,
Perhaps a workaround exists (I haven't had time to explore it), but I will note that this is a known bug. SPR 855214. "Macro Buttons are not available and macro keyboard shortcuts are not working in Large Design Review mode." No indication of if or when its going to be fixed, however.
You might have to convert to an addin to get the functionality that you want.
Keith
SOLIDWORKS API and PDM API Training and Services
Thanks Artem.
How do you assign a macro to an icon or a keyboard shortcut that would work in LDR mode?
I have your macro assigned to Shift+F shortcut. It does nothing in LDR. Also, could not figure out how to add an icon to the LDR toolbar.
I added the macro as an icon to a standard toolbar, which could be shown in LDR mode. Unfortunately, when I click on the icon, nothing happens.