Navisworks 可以通过如下方法设置颜色
image.png
我们可以使用如下代码提取所设置的颜色
image.pngusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Autodesk.Navisworks.Api;
namespace CScript
{
public class CScript
{
static public void Main()
{
Document oDoc = Autodesk.Navisworks.Api.Application.ActiveDocument;
ModelItemCollection oModelColl= oDoc.CurrentSelection.SelectedItems;
foreach(ModelItem oItem in oModelColl){
Console.WriteLine(oItem.Geometry.PermanentColor);
}
}
}
}
网友评论