AutoCAD 2007/2008/2009

Reply
*Bill DeShawn
Message 1 of 8 (3,144 Views)

Dynamic blocks and anonymous names

3144 Views, 7 Replies
03-30-2008 08:32 PM
I have been working with a consultant whose drawings have dynamic blocks. I
have noticed that for some odd reason, some of the blocks have anonymous
names and others do not. They can have the same effective name, but they
may not always have an anonymous name. How can we make dynamic blocks so
that they do NOT have anonymous names?

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!
*Expert Elite*
M_Hensley
Posts: 1,648
Registered: ‎12-11-2003
Message 2 of 8 (3,142 Views)

Re: Dynamic blocks and anonymous names

03-31-2008 03:59 AM in reply to: *Bill DeShawn
Whenever you change anything about a dynamic block (such as its visibility state) it automatically changes to an anonymous block. There is no way to stop it.
*Bill DeShawn
Message 3 of 8 (3,142 Views)

Re: Dynamic blocks and anonymous names

03-31-2008 06:21 AM in reply to: *Bill DeShawn
So when you first create the block, it's not anonymous, but change it and it
is anonymous?

--


_________________________

Bill DeShawn
bdeshawn@nospamsterling.net
http://my.sterling.net/~bdeshawn
Notice: New LISP tool for Landscape
Design and for ATTEXT users.
Measure and Divide with attributes!!


wrote in message news:5889769@discussion.autodesk.com...
Whenever you change anything about a dynamic block (such as its visibility
state) it automatically changes to an anonymous block. There is no way to
stop it.
Distinguished Contributor
JNieman
Posts: 1,744
Registered: ‎07-18-2006
Message 4 of 8 (3,142 Views)

Re: Dynamic blocks and anonymous names

03-31-2008 06:35 AM in reply to: *Bill DeShawn
If the name didn't change when the block was modified past it's default state, then you would have differently appearing blocks with the same name... which is impossible. A block can only have one definition, thus if you modify a block to have a different definition (such as toggling a vis state or adding the number of entities to the array via stretch) it must create a new block name to avoid that conflict.
Active Member
Posts: 10
Registered: ‎11-04-2008
Message 5 of 8 (3,091 Views)

Re: Dynamic blocks and anonymous names

10-28-2010 05:15 AM in reply to: *Bill DeShawn

I need to be able to easily rename the blocks in my block library to eliminate (reduce) the errors that occur when my team uses cut&paste to take blocks from an old drawing into a drawing with the new library in it.  When they do this and blocks already exist in the new drawing that also exist (name-wise) in the drawing they are cutting&pasting from the blocks update incorrectly.  If I could do an automated renaming of the blocks in the new library this would solve the issue.  Alas... I cannot get access to the "Block Name:" of any blocks that are Dynamic.

 

So... okay... I understand the concept of needing "anonymous" block names to accurately depict differing visibility states etc... but if you "list" a dynamic blocks data using the "LIST" command you get this:

 

                  BLOCK REFERENCE  Layer: "P-Fixt-Symb"
                            Space: Model space
                   Handle = 25b22
       Block Name: "Tub-Std-32x60-Dyn"
   Anonymous Name: "*U286"
                at point, X=-202'-8 47/64"  Y=124'-0 63/64"  Z=    0'-0"
   X scale factor:  1.000000
   Y scale factor:  1.000000
   rotation angle:   0.00
   Z scale factor:  1.000000
         InsUnits: Inches
  Unit conversion:  1.000000
  Scale uniformly: No
  Allow exploding: Yes
       Flip state: Flipped

 

You will note that you get BOTH the Block Name: and the Anonymous Name: yet we cannot access the "Block Name:" programatically in order to automate "renaming" the dynamic block... yet you CAN rename the dynamic blocks using the "RENAME" command... so it is obviously possible to do it... you just don't seem to be able to easily do this with a LISP file etc.

 

We need to be able to access the "Block Name:" programatically.  Does anyone know of a way to do this?

 

Thanks,

 

Mike

Distinguished Mentor
Posts: 889
Registered: ‎08-08-2006
Message 6 of 8 (3,090 Views)

Re: Dynamic blocks and anonymous names

10-28-2010 05:25 AM in reply to: mike.harkins

maybe this will help

 

this will return the block's name (actually the effective name)

(vl-load-com)
(setq obj (vlax-ename->vla-object (car (entsel "Select block: "))))
(setq blkame (vlax-get obj 'Effectivename))   

 

this will edit the block's name (the anonymous name) to be the same as the effective name

 

(vl-load-com)
(setq obj (vlax-ename->vla-object (car (entsel "Select block: "))))
(vlax-put obj 'Name (vlax-get obj 'Effectivename))

 

 

 

 

 

~~~Civil 3D 2008~~~
Active Member
Posts: 10
Registered: ‎11-04-2008
Message 7 of 8 (3,079 Views)

Re: Dynamic blocks and anonymous names

10-28-2010 05:51 AM in reply to: *Bill DeShawn

Thanks!!!

 

That worked great...

 

 

;; Renames Dynamic Blocks with "-Dyn" suffix added
;; Need to add routine to check for existing prefix)
(defun c:RBlk (/)
  (vl-load-com)
  (setq obj (vlax-ename->vla-object (car (entsel "Select block: ")))
        Eblkname (vlax-get obj 'Effectivename)
        Nblkname (strcat (vlax-get obj 'Effectivename) "-Dyn")
  )
  (prompt (strcat "\n\nDynamic block " Eblkname "\nhas been renamed to: " Nblkname "\n"))
  (command "_.rename" "b" Eblkname Nblkname)
  (princ)
); EOF

 

You are my hero... 

 

Mike

New Member
ConyMendoza
Posts: 1
Registered: ‎03-24-2011
Message 8 of 8 (2,677 Views)

Re: Dynamic blocks and anonymous names

03-24-2011 09:10 AM in reply to: *Bill DeShawn

when i list a dynamic block i have created i get the following:

 

Select objects:
                  BLOCK REFERENCE  Layer: "TC-OUTLET_BACKBOX"
                            Space: Model space
                   Transparency: 2
                   Handle = 71238
       Block Name: "WALL OUTLET"
   Anonymous Name: "*U12"
                at point, X=15'-6 13/16"  Y=4'-10 3/8"  Z=    0'-0"
   X scale factor:    1.0000
   Y scale factor:    1.0000
   rotation angle:   0.00
   Z scale factor:    1.0000
         InsUnits: Inches
  Unit conversion:    1.0000
  Scale uniformly: Yes
  Allow exploding: Yes
      Visibility1: NONE
    Rotate Symbol:      0.00
      Position1 X: 0'-0 1/16"
      Position1 Y: 0'-0 3/16"
      Position2 X: 0'-0 3/16"\

 

I am using the export attributes via express tool for my count of items but my data extrat reads the    Anonymous Name: "*U12" rather that the name of the block? Can you help me?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube