Jump to content

lisp required to resolve snapping issues


amb2301

Recommended Posts

Hi Friends, 
    i have a task to check & resolve snapping issues in a drawing,
Here i have a block named "blk1" which is placed all over the drawing inside each lot, 
i have pline in each lot, which has to be connected to this block corner, i mean each pline end point to be snapped properly to the end point of the block(blk1).

Photo1.jpg shows the blocks appears to be connected properly but actually its not connected 
if we zoom more & check the same, Photo2.jpg shows that pline is not snapped properly with the end point of the block.

there are 1000+ simillar cases all over the drawing, so is it possible to get the 
end point of pline to get automatically connected with the End point of block (blk1).
attched a sample file for the reference.

Hope some expert would help me on it & it would be a great help for me.

Thanks in Advance.

photo1.JPG

photo2.JPG

sample1.dwg

Link to comment
Share on other sites

There is a lot of examples about searching for something at a less than distance away, I use a polygon method ie a circle in conjunction with ssget to find the objects touching then can check are two points EQUAL note equal function.

 

Need to have  a think as a dynamic Block ?  May be quick using bounding box and UCS to get corners.

Link to comment
Share on other sites

Hi Sir, Thank you so much for looking on this thread.

please ignore that Dynamic blocks, just consider it as a Block without any actions on it (actually i have applied the actions on it for my task)

could you please help me with some sample.

 

Link to comment
Share on other sites

The dynamic block is making it harder, do you really need it to be dynamic,  could it not be  a plain block ?

 

1 block seems to be drawn by co-ordinates of the corners.

 

2 the default block is at like 45 degrees so you must do some form of rotation calc.

 

3 what is the order the block 1st then the line ? If so make sure end snap is on alternatively use a lisp to use the correct corner co-ords as start point of the pline.

 

4 weird angles is there a reason or was it just copy and pasted from another dwg ?

 

image.png.f78f9f803702981e2a4df6906b4eb403.png

 

5 fix the drafting issues up front then no need to have to fix. The error is like 0.0008 do you really need to fix ? Just do it right next time.

 

Edited by BIGAL
Link to comment
Share on other sites

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...