怎么给块参照制定一个颜色
using (Transaction trans = doc.TransactionManager.StartTransaction()){
BlockTable BlkTab = (BlockTable)trans.GetObject(doc.Database.BlockTableId, OpenMode.ForRead) as BlockTable;
BlockTableRecord btr = (BlockTableRecord)trans.GetObject(BlkTab, OpenMode.ForRead);
foreach (ObjectId ID in btr)
{
Entity Ent = trans.GetObject(ID,OpenMode.ForRead,true) as Entity;
if (Ent != null)
{
if (Ent is BlockReference)
{
Blk.Color=??????????//这里怎么写,怎么给块颜色
}
}
}
}
块参照要设置颜色的话,对应的块定义包含的实体颜色要设置为byblock 雪山飞狐_lzh老师说的正确 小妹在这里谢谢各位大侠、老师的指点和指导
页:
[1]