Ok... sitting around the hotel room just really got to me... so I ran out earlier and got a bite to eat and purchased the "Dark Fury" DVD while I was waiting for my food. While I finished waiting I sat down and wrote up the VBA code sample. Below is the sample code that I came up with that selects an object on screen at a specific point and returns the number of objects selected.
Public Sub GetSelection()
Dim acSSet As AcadSelectionSet
Dim dPt(0 To 2) As Double
dPt(0) = 1: dPt(1) = 1: dPt(2) = 0
Set acSSet = ThisDrawing.SelectionSets.Add("SSET")
acSSet.SelectAtPoint dPt
ThisDrawing.Utility.Prompt vbLf + "Number of Objects Selected: " + CStr(acSSet.Count) + vbCrLf + "Command: "
acSSet.Delete
Set acSSet = Nothing
End Sub
These are very simple examples, but show that each language takes some different levels of effort over the other. This doesn't mean that one that one is better for one specific job, it just means that you should use what works best for you. I hope to in the future provide some additional examples, as some get really crazy like creating an object such as a Line... or is it an AcDbLine?
Sincerely,
Lee
Recent Comments