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

change layer

2 REPLIES 2
Reply
Message 1 of 3
Josefilho
174 Views, 2 Replies

change layer

Please, How can I change the current layer of a drawing to another existing layer?

I'm using VB 2005 Express Beta 2, and tested many examples and they worked fine.

Thanks a lot in advance.
Jose
2 REPLIES 2
Message 2 of 3
Mikko
in reply to: Josefilho

Dim ExistingLayerId As ObjectId
Dim elt As LayerTable = CType(tm.GetObject(db.LayerTableId, OpenMode.ForRead, False), LayerTable)
ExistingLayerId = elt.Item("Your Layer Name")
Dim db As Database = HostApplicationServices.WorkingDatabase
Dim curLay As ObjectId = db.Clayer
db.Clayer = ExistingLayerId
' Do something
db.Clayer = curLay
Message 3 of 3
Josefilho
in reply to: Josefilho

Thank you very much.

Regards
Jose

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