.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set a layer current?

1 REPLY 1
Reply
Message 1 of 2
tangferry
254 Views, 1 Reply

How to set a layer current?

I use the "Clayer" property of the Database object,but it doesn't work.
The codes are like the following:
Database db = HostApplicationServices.WorkingDatabase;
DBTrans tm =db.TransactionManager;
using (Transaction trans=tm.StartTransaction())
{
........
db.Clayer=id; // id is a valid ObjectId of a database layer
trans.commit()
} Message was edited by: tangferry
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: tangferry

The asignment statement is correct.
How are you determining the ObjectId for the layer ?


wrote in message news:5020999@discussion.autodesk.com...
I use the "Clayer" property of the Database object,but it doesn't work.
The codes are like the following:
Database db = HostApplicationServices.WorkingDatabase;
DBTrans tm =db.TransactionManager;
using (Transaction trans=tm.StartTransaction())
{
........
db.Clayer=id; // id is a valid ObjectId of a database layer
trans.commit()
}

Message was edited by: tangferry

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost