![]() |
【转帖】如何设置图层不可见?
如何设置图层不可见?
www.dimcax.com 如何设置图层不可见? 代码: database db = hostapplicationservices.workingdatabase; transaction trans = db.transactionmanager.starttransaction(); arraylist hidelayernames = new arraylist(); try { //首先获取图层表... layertable lt = (layertable)trans.getobject(db.layertableid, openmode.forwrite); foreach (objectid layerid in lt) { layertablerecord player = (layertablerecord)trans.getobject(layerid, openmode.forwrite); if (player.name != "1") { if (!player.ishidden) { player.ishidden = true; //隐藏图层.执行此引发异常 } } } trans.commit(); } catch { } finally { trans.dispose(); } 设置图层不可见是isoff,而不是ishidden。 c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。 wywzy 不过ishidden是不能赋值的,不知道ishidden是用来做什么的 c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。 老大能讲讲 ishidden 是怎么用吗? 书山有路勤为径,学海无涯苦作舟! ishidden还没搞清楚是怎么回事,好像能读取,但不能赋值,但它好像是可读写属性 c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。 ishidden 字面意义:这个属性用来判断该图层是否是隐藏的 |
所有的时间均为北京时间。 现在的时间是 08:18 AM. |