Author Topic: How to select nested blocks in a block?  (Read 9311 times)

0 Members and 1 Guest are viewing this topic.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: How to select nested blocks in a block?
« Reply #15 on: April 12, 2011, 11:06:07 AM »

You can lead a horse to water, but some you just need to drown.

Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: How to select nested blocks in a block?
« Reply #16 on: April 12, 2011, 11:49:56 AM »
What's going on around ?

trogg

  • Bull Frog
  • Posts: 255
Re: How to select nested blocks in a block?
« Reply #17 on: April 12, 2011, 02:48:31 PM »
I found this out recently:
within the block editor, you can place multiple "Points" from the "parameters" tab.
Now in the drawing area when you insert the block, hit the CTRL key and the block insertion point will go through all of the points that you placed. When you land on the one that you want, click to place it.
Works with nested blocks too

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: How to select nested blocks in a block?
« Reply #18 on: April 12, 2011, 02:52:48 PM »
I found this out recently:
within the block editor, you can place multiple "Points" from the "parameters" tab.
Now in the drawing area when you insert the block, hit the CTRL key and the block insertion point will go through all of the points that you placed. When you land on the one that you want, click to place it.
Works with nested blocks too
Neato! Post an example block, if you don't mind.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to select nested blocks in a block?
« Reply #19 on: April 13, 2011, 04:40:07 AM »
I found this out recently:
...
Neato! Post an example block, if you don't mind.

attached a block
insert the block then click CNTRL before picking the insertion point the insertion point will be changed refer to the poit parameter you create inside the block

the way the Base Point Parameter works is that if you have it included in actions, the manipulation of the block will not take it's geometry further away from the "grip" that acts as the block's insertion point. it forces the "base point" along for the ride during manipulation.

as for the multiple insertion points, DB's use other parameter grips that have "cycling" turned on, and are accessed by tapping the "Ctrl" key prior to placement. However, the actuall "base" of the block does not change along w/ the toggling.

as for the last point. just make a "move" point last during the creation of your DB's and have it affect "all" things in the Block Editor. I know, i know i've said to not include other actions because of odd behavior, but (and this is untried) it should not matter in this case. I hope i'm not wrong, but if i am, just remove all other "actions" from this last move action, and it should work as expected.
http://forums.augi.com/showpost.php?p=716980&postcount=3

kruuger

  • Swamp Rat
  • Posts: 637
Re: How to select nested blocks in a block?
« Reply #20 on: April 13, 2011, 04:55:59 AM »
I found this out recently:
within the block editor, you can place multiple "Points" from the "parameters" tab.
Now in the drawing area when you insert the block, hit the CTRL key and the block insertion point will go through all of the points that you placed. When you land on the one that you want, click to place it.
Works with nested blocks too
when you insert block you can always change your base point placement
Code: [Select]
Specify insertion point or [Basepoint/Scale/Rotate]: _Bparameters are not required ;)
kruuger


kruuger

  • Swamp Rat
  • Posts: 637
Re: How to select nested blocks in a block?
« Reply #22 on: April 13, 2011, 05:29:00 AM »
http://www.dailyautocad.com/2008/01/using-multiple-insertion-points-in.html
i think it doesn't make sense to use multiple insertion point if we can change point when insert block. multiple point very slow down work with drawings. it kills dwg performance
kruuger

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to select nested blocks in a block?
« Reply #23 on: April 22, 2011, 04:57:11 AM »
....
. it kills dwg performance
kruuger

I agree But why don't we know an AutoCAD option? Lets say Just for fun.  :wink:

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to select nested blocks in a block?
« Reply #24 on: May 04, 2011, 06:09:16 AM »
This is my personalized version
Code: [Select]
(defun c:InsPC (/ ent blk blkang blkangD blkins blkinsX blkinsY blkinsZ
      ThisOne InsList
      pt inspt insptX insptY insptZ insblk) ;pBe
  
  (setq ent     (entget (car (entsel))))
  (setq blk     (tblobjname "block" (cdr (assoc 2 ent))))
  (setq blkang  (cdr (assoc 50 ent)))
  (setq blkangD (/ (* blkang 180.0) pi))
  (setq blkins  (cdr (assoc 10 ent)))

  (if (not (tblsearch "block" "Point-0"))
    (progn
      (command "insert" "C:/EC-Menu/Blocks/EC-Coord.dwg" '(0.0 0.0 0.0) "1" "1" "0")
      (command "erase" "last" "")
      ))
  
  (while
    (setq blk (entnext blk))
    (if (and
 (eq (cdr (assoc 0 (setq ThisOne (entget blk)))) "INSERT")
 (eq (cdr (assoc 2 (setq ThisOne (entget blk)))) "PileSymbol")
 )
      (setq InsList (cons (list (cdr (assoc 2 ThisOne))
(cdr (assoc 10 ThisOne))) InsList))))
  (foreach pt InsList
    (progn
      (setq inspt (trans (cadr pt)1 0))
      (setq insblk (entmakex (list (cons 0 "INSERT")
  (cons 2 "Point-0")
          (cons 10 (list (+ (nth 0 (trans (cadr pt)1 0)) (nth 0 (cdr (assoc 10 ent))))
 (+ (nth 1 (trans (cadr pt)1 0)) (nth 1 (cdr (assoc 10 ent))))
 (+ (nth 2 (trans (cadr pt)1 0)) (nth 2 (cdr (assoc 10 ent))))
 ))
          (cons 41 0.25)
  (cons 42 0.25)
  (cons 43 0.25))))
      (command "._rotate" "last" "" blkins blkangd)
      )
    )
  (princ)
  )

HasanCAD

  • Swamp Rat
  • Posts: 1422
Re: How to select nested blocks in a block?
« Reply #25 on: May 09, 2011, 08:28:31 AM »
Why is this lisp not working with Annotative block?

This is my personalized version
Code: [Select]
(defun c:InsPC (/ ent blk blkang blkangD blkins blkinsX blkinsY blkinsZ
       ThisOne InsList
       pt inspt insptX insptY insptZ insblk) ;pBe
 
  (setq ent     (entget (car (entsel))))
  (setq blk     (tblobjname "block" (cdr (assoc 2 ent))))
  (setq blkang  (cdr (assoc 50 ent)))
  (setq blkangD (/ (* blkang 180.0) pi))
  (setq blkins  (cdr (assoc 10 ent)))

  (if (not (tblsearch "block" "Point-0"))
    (progn
      (command "insert" "C:/EC-Menu/Blocks/EC-Coord.dwg" '(0.0 0.0 0.0) "1" "1" "0")
      (command "erase" "last" "")
      ))
 
  (while
    (setq blk (entnext blk))
    (if (and
  (eq (cdr (assoc 0 (setq ThisOne (entget blk)))) "INSERT")
  (eq (cdr (assoc 2 (setq ThisOne (entget blk)))) "PileSymbol")
  )
      (setq InsList (cons (list (cdr (assoc 2 ThisOne))
(cdr (assoc 10 ThisOne))) InsList))))
  (foreach pt InsList
    (progn
      (setq inspt (trans (cadr pt)1 0))
      (setq insblk (entmakex (list (cons 0 "INSERT")
   (cons 2 "Point-0")
           (cons 10 (list (+ (nth 0 (trans (cadr pt)1 0)) (nth 0 (cdr (assoc 10 ent))))
  (+ (nth 1 (trans (cadr pt)1 0)) (nth 1 (cdr (assoc 10 ent))))
  (+ (nth 2 (trans (cadr pt)1 0)) (nth 2 (cdr (assoc 10 ent))))
  ))
           (cons 41 0.25)
   (cons 42 0.25)
   (cons 43 0.25))))
      (command "._rotate" "last" "" blkins blkangd)
      )
    )
  (princ)
  )
« Last Edit: May 09, 2011, 09:45:31 AM by HasanCAD »