Example #1
0
 void ObjectChanged(IGH_DocumentObject sender, GH_ObjectChangedEventArgs e)
 {
     if (e.Type == GH_ObjectEventType.Preview)
     {
         Revit.RefreshActiveView();
     }
 }
Example #2
0
        void ActiveDefinition_SettingsChanged(object sender, GH_DocSettingsEventArgs e)
        {
            if (e.Kind == GH_DocumentSettings.Properties)
            {
                RebuildPrimitives = 1;
            }

            Revit.RefreshActiveView();
        }
        public override Result Execute(ExternalCommandData data, ref string message, DB.ElementSet elements)
        {
            GH_Document.EnableSolutions = !GH_Document.EnableSolutions;

            if (GH_Document.EnableSolutions)
            {
                if (Instances.ActiveCanvas?.Document is GH_Document definition)
                {
                    definition.NewSolution(false);
                }
            }
            else
            {
                Revit.RefreshActiveView();
            }

            return(Result.Succeeded);
        }
Example #4
0
 static void Document_DefaultPreviewColourChanged(System.Drawing.Color colour) => Revit.RefreshActiveView();
Example #5
0
 void ActiveDefinition_SolutionEnd(object sender, GH_SolutionEventArgs e)
 {
     RebuildPrimitives = 1;
     Revit.RefreshActiveView();
 }
Example #6
0
 public override Result Execute(ExternalCommandData data, ref string message, ElementSet elements)
 {
     GH.PreviewServer.PreviewMode = Grasshopper.Kernel.GH_PreviewMode.Shaded;
     Revit.RefreshActiveView();
     return(Result.Succeeded);
 }
Example #7
0
 static void Editor_VisibleChanged(object sender, EventArgs e) => Revit.RefreshActiveView();
Example #8
0
 void ActiveDefinition_SolutionEnd(object sender, GH_SolutionEventArgs e)
 {
     Clear();
     Revit.RefreshActiveView();
 }