Display the inspector for the specified model
To display the inspector for the specified model, use the SetInspectedObject
method of the IWorkspaceState
object.
To deselect the inspector (to display a message in the inspector indicating that the target element should be selected), specify null as the argument.
public void SetInspectedObject(ICommandContext c, ICommandParams p)
{
var model = c.App.Workspace.CurrentProject.GetAllChildren().FirstOrDefault(m => m.Name == "ADAS System Requirements");
IWorkspaceState workspaceState = c.App.Workspace.State;
//Set the specified model as the inspector
//If null is specified, the inspector will be deselected
workspaceState.SetInspectedObject(model);
}