Try these codes:
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim bRet As Boolean
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
bRet = swModel.Extension.HideFeatureManager(True)
Do yoy know if it's possible to colapse it instead of hiding?
When I save part to jpg, entire model area is taken but zoomtofit recognizes only area without Feature manager. Even when it's hiden.
I have done this by setting feature manager width to 0
but this is not the most elegant way.