Message 1 of 6
Select a point and print its coortinates in text boxes
Not applicable
01-16-2007
11:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I looked in all the relative topics but i couldn't find help.Can somebody help me?I made a select event so as to pick a point; that works ok.My problem is that i want its coordinates to appear in 2 text boxes. My try is:
Private Sub oSelectPoint_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, _
ByVal SelectionDevice As SelectionDeviceEnum, _
ByVal ModelPosition As Point, _
ByVal ViewPosition As Point2d, _
ByVal View As View)
Dim oSelectedEnt As ObjectsEnumerator
Set oSelectedEnt = oSelectPoint.SelectedEntities
If TypeOf oSelectedEnt.Item(1) Is Point Then
Dim oPoint As Point
Set oPoint = oSelectedEnt.Item(1)
End If
txtX.Text = oPoint.X
txtY.Text = oPoint.Y
End Sub
What is wrong about it?
Private Sub oSelectPoint_OnSelect(ByVal JustSelectedEntities As ObjectsEnumerator, _
ByVal SelectionDevice As SelectionDeviceEnum, _
ByVal ModelPosition As Point, _
ByVal ViewPosition As Point2d, _
ByVal View As View)
Dim oSelectedEnt As ObjectsEnumerator
Set oSelectedEnt = oSelectPoint.SelectedEntities
If TypeOf oSelectedEnt.Item(1) Is Point Then
Dim oPoint As Point
Set oPoint = oSelectedEnt.Item(1)
End If
txtX.Text = oPoint.X
txtY.Text = oPoint.Y
End Sub
What is wrong about it?