求助! vb.net怎样实现cad新建图层?
怎样在vb.net下实现cad新建图层.帮忙介绍详细点!
谢谢!!! Public Sub createNewLayer()<BR> Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database<BR> Dim tm As DBTransMan = db.TransactionManager<BR> Dim ta As Transaction = tm.StartTransaction()<BR> Try<BR> Dim LT As LayerTable = tm.GetObject(db.LayerTableId, OpenMode.ForWrite, False)<BR> Dim LTRec As New LayerTableRecord
'LTRec.Name = "ASDK_MYLAYER"
LT.Add(LTRec)<BR> tm.AddNewlyCreatedDBObject(LTRec, True)<BR> ta.Commit()<BR> Finally<BR> ta.Dispose()<BR> End Try<BR> End Sub 非常谢谢
页:
[1]