
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hope someone can really help in this weird case. I also looked at forum tickets but without a solution for me.
Very simple code:
Point1 = ThisDrawing.Utility.GetPoint(, vbCr & "Specify first corner:")
Point2 = ThisDrawing.Utility.GetCorner(Point1, "Enter Other corner: ")
MsgBox "The point picked is" & Point1(0) & ", " & Point1(1) & "-" & Point1(2) & "-----" & Point2(0) & ", " & Point2(1) & "-" & Point2(2)
‘ the displayed cords are correct!
Dim dblPoints(0 To 3) As Double
dblPoints(0) = Point1(0)
dblPoints(1) = Point1(1)
dblPoints(2) = Point2(0)
dblPoints(3) = Point2(1)
Set AcadPolyline = ThisDrawing.ModelSpace.AddLightWeightPolyline(dblPoints)
‘ the line is correct on layout, it connects the two selected point!
Dim objSSet As AcadSelectionSet
Set objSSet = ThisDrawing.SelectionSets.Add("mySel")
objSSet.Select acSelectionSetCrossing, Point1, Point2
objSSet.Highlight True
MsgBox ("SELECTION COUNT: " & ThisDrawing.SelectionSets("mySel").Count)
The final selection is wrong! It seems that the Select function has a sort of offset (big) with respect to my selected points.
Does someone know the explanation of this behaviour? Is there something that I need to set/verify in autocad options?
Thank you,
Giuseppe
Solved! Go to Solution.