我想获得参数并修改其值,这样写了一段程序,但是却无法得到参数对象,不知是哪里有问题,请高手指点一下. Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database Dim res As PromptSelectionResult = ed.SelectAll If (res.Status = PromptStatus.OK) Then Using myT As Transaction = db.TransactionManager.StartTransaction() For Each id As ObjectId In res.Value.GetObjectIds Dim entity As Entity = myT.GetObject(id, OpenMode.ForWrite, True) If TypeOf (entity) Is IParameter Then Dim iPara As Autodesk.AutoCAD.DatabaseServices.IParameter = CType(entity, IParameter) MsgBox(iPara.Name) End If Next End Using End If
|