AutoCAD 2000/2000i/2002 Archive

AutoCAD 2000/2000i/2002 Archive

Reply
*Velez, Juan Carlos
Message 1 of 6 (251 Views)

How Rename Anonymous Blocks *u????

251 Views, 5 Replies
05-29-2001 06:53 AM
How I can Rename any Block With Name *u
*Piercey, Jason
Message 2 of 6 (251 Views)

Re: How Rename Anonymous Blocks *u????

05-29-2001 07:02 AM in reply to: *Velez, Juan Carlos
Why do you need to rename them?

-Jason

Juan Carlos Velez wrote:

> How I can Rename any Block With Name *u
*Velez, Juan Carlos
Message 3 of 6 (251 Views)

Re:

05-29-2001 07:11 AM in reply to: *Velez, Juan Carlos
Because I have any blocks in my design whith this name and i need redefine
those and I need use REFEDIT in this Blocks
Jason Piercey escribió en el mensaje de noticias
3B141C93.FAD7806D@kc.rr.com...
> Why do you need to rename them?
>
> -Jason
>
> Juan Carlos Velez wrote:
>
> > How I can Rename any Block With Name *u
>
*Baker, Jon
Message 4 of 6 (251 Views)

Re:

05-29-2001 08:46 AM in reply to: *Velez, Juan Carlos
use the command RENAME

--
Please scroll and read previous posts, this way you will not post the same
exact question

Jonathan Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado 80246
http://www.rrengineers.com/
Phone: 303-753-6730 ext 15

________________________

"Juan Carlos Velez" wrote in message
news:999408D77A8EF521A72FE9288A442BC5@in.WebX.maYIadrTaRb...
| Because I have any blocks in my design whith this name and i need redefine
| those and I need use REFEDIT in this Blocks
| Jason Piercey escribió en el mensaje de noticias
| 3B141C93.FAD7806D@kc.rr.com...
| > Why do you need to rename them?
| >
| > -Jason
| >
| > Juan Carlos Velez wrote:
| >
| > > How I can Rename any Block With Name *u
| >
|
|
*White, Ian A.
Message 5 of 6 (251 Views)

Re:

05-29-2001 11:48 AM in reply to: *Velez, Juan Carlos
On Tue, 29 May 2001 15:11:07 -0700, "Juan Carlos Velez"
wrote:

>Because I have any blocks in my design whith this name and i need redefine
>those and I need use REFEDIT in this Blocks

With anonymous blocks, this should not be a problem as the numbers
after the *U are assigned or reassigned when a drawing is loaded.

Regards,

--

Ian A. White, CPEng
WAI Engineering
Sydney 2000
Australia

Ph: +61 418 203 229
Fax: +61 2 9622 0450
Home Page: www.wai.com.au
*Madhanagopal
Message 6 of 6 (251 Views)

Re: How Rename Anonymous Blocks *u????

05-29-2001 02:43 PM in reply to: *Velez, Juan Carlos
Yes, it is possible to rename an annonymous block from *U17 to MTM_17 (for
example). But when you list the available blocks in a drawing using commands
like BLOCK or INSERT, MTM_17 will not be listed as it is an annonymous block
(but it exists). Just by changing an annonymous block's name will not make
it a named block. The group code 70 decides if this block is annonymous or
not, and this group code cannot be edited.

For example, create an annonymous block "*T" using any_blk function and then
execute the ren_blk function to rename it to "TESTBLOCK"

(defun c:any_blk ()
(vl-load-com)
(setq a_app (VLAX-GET-ACAD-OBJECT)
a_doc (vla-get-ActiveDocument a_app)
a_blks (vla-get-blocks a_doc)
blk (vla-add a_blks (vlax-3d-point '(0 0 0)) "*T")
)
(vla-addcircle blk (vlax-3d-point '(0 0 0)) 3)
)


(defun c:ren_blk ()
(vl-load-com)
(setq a_app (VLAX-GET-ACAD-OBJECT)
a_doc (vla-get-ActiveDocument a_app)
a_blks (vla-get-blocks a_doc)
blk (vla-item a_blks "*T1")
)
(vla-put-name blk "TESTBLOCK")
)

Now invoke command INSERT and you will find that TESTBLOCK is not listed,
but you are allowed to type the blockname and then to insert it.

The block TESTBLOCK is not listed as it is an annonymous block.

As a workaround, I would suggest you to make a copy of the annonymous block
instead of renaming it, as shown in the following sample code:

(defun c:cop_blk ()
(vl-load-com)
(setq a_app (VLAX-GET-ACAD-OBJECT)
a_doc (vla-get-ActiveDocument a_app)
a_blks (vla-get-blocks a_doc)
i 0
blk (vla-item a_blks "*T1")
inspt (vla-get-origin blk)

cnt (- (vla-get-count blk) 1)
newfil (vlax-make-safearray vlax-vbobject (cons 0 cnt))
)
(vlax-for ent blk
(vlax-safearray-put-element newfil i ent)
(setq i (1+ i))
)
(setq newblk (vla-add a_blks inspt "TESTBLOCK"))
(vla-copyobjects a_doc newfil newblk nil)
)



--
Madhanagopal
AutoCAD & MCAD Product Support, INDIA
WW Support & Services, Autodesk
Discussion Q&A: http://www.autodesk.com/discussion

"Juan Carlos Velez" wrote in message
news:f053069.-1@WebX.maYIadrTaRb...
> I have any blocks *u318 how I renme those blokcs
>
>
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.