Message 1 of 2
Not applicable
03-21-2019
06:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am learning .net and am stumbling on a relatively simple task. I'd like to create a selection set of points and then take one point, say, left most point(lowest X coordinate) and change its color. So the first part of the code is fine but how would you get to use that one point? Thanks!
Imports System
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
Imports Autodesk.AutoCAD.EditorInput
Public Class AdskClass
<CommandMethod("SelectPTS")>
Public Sub SelectPTS()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim base As Database = doc.Database
Dim ss(0) As TypedValue
ss.SetValue(New TypedValue(DxfCode.Start, "point"), 0)
Dim ssfilter As SelectionFilter = New SelectionFilter(ss)
Dim sel As PromptSelectionResult
sel = ed.GetSelection(ssfilter)
Solved! Go to Solution.