Hide the FeatureManager Design Tree Example (C#)
This example shows how to hide the FeatureManager design tree.
//----------------------------------------------------------------------------
// Preconditions:
// 1. Model document is open.
// 2. Rename the namespace of this macro to match the name of your C#
project.
//
// Postconditions: FeatureManager design tree is hidden.
//--------------------------------------
using
SolidWorks.Interop.sldworks;
using
SolidWorks.Interop.swconst;
using
System;
namespace
HideFeatureManager_CSharp.csproj
{
partial
class
SolidWorksMacro
{
void
Main()
{
ModelDoc2
swModel;
ModelDocExtension
swModDocExt;
bool
bRet;
swModel = (ModelDoc2)swApp.ActiveDoc;
swModDocExt = swModel.Extension;
bRet = swModDocExt.HideFeatureManager(true);
}
public
SldWorks
swApp;
}
}