How to select feature in Home, Program and Model context

Forum Forums Visual Components 4.0 .NET Addon Programming How to select feature in Home, Program and Model context

Visual Components Essentials has been officially released, download link

Be sure to read the Forum Rules and Guidelines before start using the Forum.

Tagged: ,

This topic contains 0 replies, has 1 voice, and was last updated by Jay Jay 2 months, 1 week ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #3483
    Jay
    Jay
    Participant

    This will select all features in a component on home, model or program context.

    public void SelectFeature()
    {
    var comp = IoC.Get<IApplication>().World.Components.First();
    if (comp != null)
    {
    var feats = comp.Features;
    var authorcontext = IoC.Get<IAuthorContext>();
    var nodefeaturelist = new NodeFeatureList(comp.RootNode, feats);
    authorcontext.SetActiveFeatures(new List<NodeFeatureList>() {  nodefeaturelist }, false);
    }
    }

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.