attedit - multiple layer change? URGENT!
Hi guys,
I'm currently working on a drawing with a large amount of equipment blocks. We ran into a problem with the layers the attribute text is on within the blocks, and need to change the layer.
The problem is that this block has been rotated and mirrored all around these drawings. This means when we run battman, or attsync to sync the layer change on the attributed text, the block then shows the attributed text as backwards or upside down after the sync, based on how the block was mirrored or rotated etc.
Does anyone have a solution to how we can get around this problem quickly? Are we forgetting a command that will change the layer without resetting the position of the text in all the blocks and leave the text as it shows currently? Are there any lisp routines out there to take care of this?
It's a very urgent matter, and your quick responses will be greatly appreciated! :)
Thanks
Re: attedit - multiple layer change? URGENT!
You might try the Layer Merge command (laymrg).
Re: attedit - multiple layer change? URGENT!
This would still require a sync to be run on the blocks... in which case the attributed tags will still appear rotated or mirrored when the blocks sync.
Re: attedit - multiple layer change? URGENT!
What is the current layer(s) the attribute resides on? What is the new layer? Is anything else on the current or new layer?
I would temporarily make a new layer for your attribute(s). If there is anything on the layers that need to remain, move those to a different temporary layer. Run laymrg as many times as necessary to get your attributes to the correct layer. IF you delete the current layers in the process of laymrg, the attributes should not continue to have a link to the incorrect layers.
You might also copy the blocks that will be modified to their own drawing and do the work in there.
Re: attedit - multiple layer change? URGENT!
Code:
(defun c:test (/ ent)
;; Alan J. Thompson, 08.25.10
(if (setq ent (car (entsel "\nSelect block: ")))
(if (eq "INSERT" (cdr (assoc 0 (entget ent))))
((lambda (e)
(while (setq e (entnext e))
(entmod (subst (cons 8 "0") (assoc 8 (entget e)) (entget e)))
)
(command "_.regen")
)
(tblobjname "BLOCK" (cdr (assoc 2 (entget ent))))
)
)
)
(princ)
)
Re: attedit - multiple layer change? URGENT!
Thanks A, can you please explain, so i can use it properly?
Re: attedit - multiple layer change? URGENT!
Quote:
Originally Posted by
DeluXe
Thanks A, can you please explain, so i can use it properly?
Load, execute and select a block.