Jump to content

Find Location To Insert Block


ziemerd

Recommended Posts

I have several blocks spaced evenly apart and I need to copy and paste another block and insert it with the same spacing. I don't want to take the step to find out how far apart they are. I believe there's a way to use the insert command to figure out the distance the next block needs to be placed when I paste it.

 

I'm not sure if I'm describing it correctly or if I can paste the block using the insert command. Hopefully I'm clear in what I'm trying to accomplish.

 

Thanks.

Link to comment
Share on other sites

The INSERT command allows the user to specify the Insertion Point, Scale, Rotation, Scale Factor and whether or not the block should be exploded. Insert the block and use the Array command. Or if that is not to your liking insert the block and use either the Divide or Measure command. Both work with blocks.

Link to comment
Share on other sites

I think using Insertion Point requires I know the distance ahead of time and then I type the distance for the block I'm trying to paste. I know there's a way to insert without having to type the distance. Perhaps I'm lost and have my information crossed.

Link to comment
Share on other sites

There is a Basepoint option in insert but it is not accurate unless using SNAP so the best thing is to insert on top of an existing block and then move it snapping from one block to the other.

 

Grip editing has the basepoint option and it lets you osnap so that it is accurate but that won't help you for what you are doing.

Link to comment
Share on other sites

Pick block 1 pick block 2 insert block 1 dist away from block 2

 

Code get insert pt of block1, get insert point of block 2, dist = pt2-pt1, new insert pt3 = pt2 + dist in x,y co-ords insert block 1 pt3 scale etc also

 

Lots of examples here about entsel and getting insert point or other block info in either common lisp or I would use VL.

 

(vl-load-com) 
(setq doc (vla-get-activedocument (vlax-get-acad-object))) 
(setq obj (entsel "pick block"))
(setq ent (vlax-ename->vla-object (car obj)))
(setq pt  (vlax-get ent 'InsertionPoint ))
(setq blname  (vlax-get ent 'Name))
; repeat as required

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