Jump to content

Recommended Posts

Posted

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!

break.JPG

Posted

one other thing

 

im sure the points that cad tells me "no object found" have an object

Posted
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)

Posted

nevermind i solved with the TRIM command

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...