Community
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 case
ognize 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
1. Partial code is fun to work with. If we are to try experimenting with stuff to see what works, now we have to code the rest of it to see what happens.
2. Not entirely sure where you are pulling your points from to being with. Is it 1 sketch? Is it multiple sketches? is it workpoints?
Can't find what you're looking for? Ask the community or share your knowledge.