Message 1 of 2
Select case (choose with X,Y Coordinates to use)

Not applicable
04-11-2018
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
SyntaxEditor Code Snippet
I can't seem to get this working, Iám trying to make a sweep (a automated railing with steel pipes)
now the sweep goes fine now what goes wrong is that de X-Y coordinates of the steel pipe changes in every
different plane x,y,z position i try to recognize this if the points are positief or negatief and the select caseognize and change te x and y coordinates but it iám doing something wrong
![]()
Dim oCircle As SketchCircle Dim XoCircle As Double Dim YoCircle As Double Dim xP1 As Double xP1 = oP1.Geometry.X Dim yP1 As Double yP1 = oP1.Geometry.Y Dim zP1 As Double zP1 = oP1.Geometry.Z Dim xP2 As Double xP2 = oP2.Geometry.X Dim yP2 As Double yP2 = oP2.Geometry.Y Dim zP2 As Double zP2 = oP2.Geometry.Z MsgBox("StartPoint: " & CStr(oP1.Geometry.X) & " , " & CStr(oP1.Geometry.Y) & " , " & CStr(oP1.Geometry.Z) _ & vbLf & "EndPoint: " & CStr(oP2.Geometry.X) & " , " & CStr(oP2.Geometry.Y) & " , " & CStr(oP2.Geometry.Z)) Select Case XoCircle And YoCircle Case xP1<=0, yP1>=0, xP2<=0, yP2>=0 XoCircle = 0 YoCircle = 0 Messagebox.Show("1") Case xP1<=0, yP1<=0, xP2<=0, yP2<=0 XoCircle = 0 YoCircle = 3 Messagebox.Show("2") Case xP1 <= 0, yP1 >= 0, xP2 <= 0, yP2 <= 0 XoCircle = 0 YoCircle = 3 Messagebox.Show("3") ' Case Else ' XoCircle = 0 ' YoCircle = 0 End Select