Freeze Bar macro?

I am looking for a macro that would run through all the parts in an assembly and activate the freeze bar on all the parts in the assembly. Does anyone have one for this that they could share?

Freeze bar should be a system option which you only need to turn on once for it to appear on all part.

If you are referring to moving the freeze bar, the example should get you started:
https://help.solidworks.com/2017/English/api/sldworksapi/Move_Freeze_Bar_Example_VB.htm

But that will appear on the top only and I think OP is looking to pull it to end of tree.

I haven’t looked at the macro I made/borrowed in a while, but I apparently have one at the link below that rolls the bar up and down the tree:
https://forum.cadmunity.com/t/my-macros/137/1

Try the macros from this post https://r1132100503382-eu1-3dswym.3dexperience.3ds.com/#community:yUw32GbYTEqKdgY7-jbZPg/iquestion:Fz_1muSwTh-efF45wHju5w