I hav a form I present to the user. On the form, the user is asked if he wishes to get the distance between the 2 points or to specify the length. I then draw the wall.
If the user specifies the length, then I use the second point only for the rotation angle.
If the user says get the distance from the 2 points, and then chooses them, it works fine too.
However, there are times when the user would like to specify the first point and input the second point at the command line.
Example:
The user chooses first point, then when prompted, "Select second point of wall:", the user types @48,0, then enter
Or
The user chooses first point, then when prompted, "Select second point of wall:", the user types 48,0, then enter.
No matter which why the user types this, the value returned is always wrong in reference to the first point.
I have tried thisdrawing.Utility.TranslateCoordinates(Point2, acWorld, acUCS, False), but it still gives me the wrong number.
Anyone have any ideas or suggestions? I do not want to have to specify a third option on the form and present different prompts. This way the user can deal with different situations after he has selected the first point.
Thanks,
Dave
Point1 = thisdrawing.Utility.GetPoint(, "Select first point of wall: ")
Point2 = thisdrawing.Utility.GetPoint(, "Select second point of wall: ")
Point2(2) = Point1(2)
retAngle = thisdrawing.Utility.AngleFromXAxis(Point1, Point2)
If Check1.value = vbChecked Then
WallWidth = CDbl(Text4.Text)
Else
xx = Point1(0) - Point2(0)
yy = Point1(1) - Point2(1)
zz = Point1(2) - Point2(2)
WallWidth = Round(Sqr((Sqr((xx ^ 2) + (yy ^ 2)) ^ 2) + (zz ^ 2)), 5)
End If