Entity.LinetypeId Property
不过,推荐的方式是只设图层的线型、颜色。。。
然后对实体只设置图层
如
/// <summary>
/// 添加图层
/// </summary>
/// <param name="name">图层名</param>
/// <param name="color">颜色</param>
/// <param name="linetypeName">线型名</param>
/// <param name="lineweight">线宽</param>
/// <returns>图层Id</returns>
public ObjectId AddLayer(string name, Color color, string linetypeName, LineWeight lineweight)
{
ObjectId id = GetRecordId(LayerTable, name);
if (id == ObjectId.Null)
{
LayerTableRecord layer = new LayerTableRecord();
layer.Name = name;
layer.Color = color;
layer.LinetypeObjectId = LinetypeTable;
layer.LineWeight = lineweight;
using (LayerTable.UpgradeOpenAndRun())
{
id = LayerTable.Add(Transaction, layer);
}
}
return id;
}
页:
1
[2]