|
发表于 2005-7-2 19:10:00
|
显示全部楼层
Public Sub createNewLayer()
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim tm As DBTransMan = db.TransactionManager
Dim ta As Transaction = tm.StartTransaction()
Try
Dim LT As LayerTable = tm.GetObject(db.LayerTableId, OpenMode.ForWrite, False)
Dim LTRec As New LayerTableRecord
'LTRec.Name = "ASDK_MYLAYER"
LT.Add(LTRec)
tm.AddNewlyCreatedDBObject(LTRec, True)
ta.Commit()
Finally
ta.Dispose()
End Try
End Sub |
|