Electronico Posted December 10, 2022 Posted December 10, 2022 Hello, I'm looking for a lisp solution to a simple but yet tedious problem. There few hundreds block that had to be placed (copied) and aligned to existing blocks (that is an additional block to be placed under an existing block where would be different pair of blocks in each case). Basically what it has to do is to use an insertion point and rotation angle of an existing block (parent block) to serve as a placement and alignment reference for a different block (child block) to be copied/inserted/placed in. See the attached picture for illustration. Thanks in advance! Quote
BIGAL Posted December 11, 2022 Posted December 11, 2022 When you pick 1st block you can get all the properties like insertionpoint, scale and rotation. So you may need a look up matching the 1st block with second block and the insertion point offset adjustment. (setq ent (entget (car (entsel "\nPick 1st block ")))) (setq ins (cdr (assoc 10 ent)) ang (cdr (assoc 50 ent)) bname (cdr (assoc 2 ent)) ) ; work out new insert point and rotation (command "-insert" bname2 s 1 newins newrot) 1 Quote
BIGAL Posted December 13, 2022 Posted December 13, 2022 Post what you ended up with may have more suggestions. 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.