kyosmith Posted April 7, 2010 Posted April 7, 2010 Hello all! i need help with this : i have got 2 entities (2 lines) with getentity and i have 3 points i need to break the lines at these points but only the last line i selected breaks. the another one give an "object not found" and when i select them in a diferent order only the last one works again. im using this to break: bpoint1 = ThisDrawing.Utility.PolarPoint(basepoint, angapoio, 3.763) bpoint2 = ThisDrawing.Utility.PolarPoint(basepoint, angapoio2, 3.763) bpx = basepoint(0) bpy = basepoint(1) x1 = bpoint1(0) y1 = bpoint1(1) x2 = bpoint2(0) y2 = bpoint2(1) guarda(0) = Replace(x1, ",", ".") guarda(1) = Replace(y1, ",", ".") guarda1(0) = Replace(x2, ",", ".") guarda1(1) = Replace(y2, ",", ".") guarda2(0) = Replace(bpx, ",", ".") guarda2(1) = Replace(bpy, ",", ".") ThisDrawing.SendCommand "_Break" & vbCr & guarda1(0) & "," & guarda1(1) & vbCr & guarda2(0) & "," & guarda2(1) & vbCr ThisDrawing.SendCommand "_Break" & vbCr & guarda(0) & "," & guarda(1) & vbCr & guarda2(0) & "," & guarda2(1) & vbCr 'end the replace thing its because vba uses "," instead of "." then i need to convert if there is another way to break lines without the sendcommand tell me to! thanks all! Quote
kyosmith Posted April 7, 2010 Author Posted April 7, 2010 one other thing im sure the points that cad tells me "no object found" have an object Quote
SZLMCL Posted April 8, 2010 Posted April 8, 2010 Hello all!i need help with this : i have got 2 entities (2 lines) with getentity and i have 3 points i need to break the lines at these points but only the last line i selected breaks. the another one give an "object not found" and when i select them in a diferent order only the last one works again. im using this to break: bpoint1 = ThisDrawing.Utility.PolarPoint(basepoint, angapoio, 3.763) bpoint2 = ThisDrawing.Utility.PolarPoint(basepoint, angapoio2, 3.763) bpx = basepoint(0) bpy = basepoint(1) x1 = bpoint1(0) y1 = bpoint1(1) x2 = bpoint2(0) y2 = bpoint2(1) guarda(0) = Replace(x1, ",", ".") guarda(1) = Replace(y1, ",", ".") guarda1(0) = Replace(x2, ",", ".") guarda1(1) = Replace(y2, ",", ".") guarda2(0) = Replace(bpx, ",", ".") guarda2(1) = Replace(bpy, ",", ".") ThisDrawing.SendCommand "_Break" & vbCr & guarda1(0) & "," & guarda1(1) & vbCr & guarda2(0) & "," & guarda2(1) & vbCr ThisDrawing.SendCommand "_Break" & vbCr & guarda(0) & "," & guarda(1) & vbCr & guarda2(0) & "," & guarda2(1) & vbCr 'end the replace thing its because vba uses "," instead of "." then i need to convert if there is another way to break lines without the sendcommand tell me to! thanks all! Hy i have same problem, here: http://www.cadtutor.net/forum/showthread.php?t=46321 This helps a little possibly... (acSelectionSetPrevious, acSelectionSetLast) Quote
kyosmith Posted April 8, 2010 Author Posted April 8, 2010 nevermind i solved with the TRIM command Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.