Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to cloud a polyline.
This works :
<CommandMethod("RevisionCloud")>
Public Shared Sub RevisionCloud()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim ids As List(Of ObjectId) = New List(Of ObjectId)()
Using tr As Transaction = db.TransactionManager.StartTransaction()
Dim bt As BlockTable = TryCast(tr.GetObject(db.BlockTableId, OpenMode.ForRead), BlockTable)
Dim ms As BlockTableRecord = TryCast(tr.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForWrite), BlockTableRecord)
Using c As Circle = New Circle(New Point3d(0, 0, 0), Vector3d.ZAxis, 20)
Dim circleId As ObjectId = ms.AppendEntity(c)
tr.AddNewlyCreatedDBObject(c, True)
ids.Add(circleId)
End Using
tr.Commit()
End Using
Dim ss As SelectionSet = SelectionSet.FromObjectIds(ids.ToArray)
ed.Command("_.REVCLOUD", "", "O", "", ss, "")
End Sub
but when I try to implement it I get
Autodesk.AutoCAD.Runtime.Exception: 'eInvalidInput'
on the line ed.Command("_.REVCLOUD", "", "O", "", ss, "")
I can't work out out what the problem might be.
Alternatively, does anyone have code that will cloud a polyline from a set of vertices?
Solved! Go to Solution.