Revit二开--Revit背景颜色设置

Revit二开–Revit背景颜色设置

从Revit2016开始提供了设置revit背景的api

API相关的类是Application

背景颜色设置方法如下


	  public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
     
            UIApplication uiapp = commandData.Application;
            UIDocument uidoc = commandData.Application.ActiveUIDocument;
            Document doc = uidoc.Document;
            Selection sel = uidoc.Selection;
             
            uiapp.Application.BackgroundColor = /*你要设置的颜色*/return Result.Succeed;
     	}


在这里插入图片描述

唐僧课堂BIM开发

你可能感兴趣的:(Revit二次开发)