Author Topic: Block Editor Rename?  (Read 10536 times)

0 Members and 1 Guest are viewing this topic.

craigr

  • Guest
Block Editor Rename?
« on: August 15, 2012, 10:58:00 AM »
I've recieved a drawing from a Coworker that has many blocks in it.

When I go to edit them in the Block Editor, they have nonsensicle names such as 'A$4E676C4A'.

I would like the names to actually mean something like '8inchbolt' instead. But, I don't want to have to explode each one and then make a new block with the new name.

Is there a command to just rename them?

craigr

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: Block Editor Rename?
« Reply #1 on: August 15, 2012, 11:04:19 AM »
There is a command "RENAME" but you don't get a preview of the block so you would have to know what they were from the name that they have now.
CAD Tech

craigr

  • Guest
Re: Block Editor Rename?
« Reply #2 on: August 15, 2012, 11:05:20 AM »
Got it. - Thanks

I don't know how I haven't run into that before.

craigr

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: Block Editor Rename?
« Reply #3 on: August 15, 2012, 11:06:16 AM »
In 2011 the block editor has is an option to "save as".
CAD Tech

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Block Editor Rename?
« Reply #4 on: August 15, 2012, 11:27:22 AM »
Ah, yes, the joys of users discovering paste as block.  The users around here have been... educated... about not using that, precisely for that reason.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

HasanCAD

  • Swamp Rat
  • Posts: 1420
Re: Block Editor Rename?
« Reply #5 on: August 16, 2012, 02:53:21 AM »

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: Block Editor Rename?
« Reply #6 on: August 16, 2012, 05:42:10 AM »
CAD Tech

craigr

  • Guest
Re: Block Editor Rename?
« Reply #7 on: August 16, 2012, 07:32:01 AM »
The 'Rename' thing worked great.

Though, as mentioned, it would be nice if there was a preview window so you don't have to remember the name of the block you want to change.

craigr

craigr

  • Guest
Re: Block Editor Rename?
« Reply #8 on: August 21, 2012, 10:02:37 AM »
Another relate question....

Now that I have renamed their blocks to appropriate 'Standard' names, is there a way to change  the properties so that the block cannot be exploded?

Other than explode it and make a 'new block' with the same name and deselect the 'explode' option.

craigr

(edited) - Yes I DID look thru the properties box AND in the Block editor and haven't found the option. - It MAY be there, but I haven't been able to spot it.

(edit AGAIN) - I DID find it!!  - You have to open the Properties Bar within the Block editor. When I looked previously, I selected the block THEN opened the properties bar.

Craigr
« Last Edit: August 21, 2012, 10:08:42 AM by craigr »

Crank

  • Water Moccasin
  • Posts: 1503
Re: Block Editor Rename?
« Reply #9 on: August 21, 2012, 03:21:23 PM »
Everybody could have told you that :P ;)

There is even an easier/faster way:
  • Start the BLOCK command (B , <ENTER>)
  • Select the block from the roll menu (ALT-N , <DOWNARROW>)
  • Check or uncheck 'Allow exploding' (ALT-E)
  • OK (<ENTER>)
  • Accept to redefine the block (<ENTER>)
Vault Professional 2023     +     AEC Collection

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
Re: Block Editor Rename?
« Reply #10 on: August 22, 2012, 03:45:37 AM »
Good way to take advantage of an annoying feature there, Crank :)

dJE
===
dJE

Dommy2Hotty

  • Swamp Rat
  • Posts: 1127
Re: Block Editor Rename?
« Reply #11 on: August 23, 2012, 02:07:24 PM »
I use this:

Code: [Select]
(defun c:BlockRename ()
  (vl-load-com)
  (setq bname (vla-get-EffectiveName (vlax-ename->vla-object (car(entsel "\nSelect block: ")))))
  (command "rename" "block" bname pause)
  );DEFUN

Command: blockrename
Select block:
rename
Enter object type to rename
[Block/Dimstyle/LAyer/LType/Material/Style/Tablestyle/Ucs/VIew/VPort]: block
Enter old block name: A$C7EDB4DDE
Enter new block name: New Block Name

Command: nil

Lee Mac

  • Seagull
  • Posts: 12905
  • London, England
Re: Block Editor Rename?
« Reply #12 on: August 23, 2012, 05:25:20 PM »
Code: [Select]
(defun c:BlockRename ()
  (vl-load-com)
  (setq bname (vla-get-EffectiveName (vlax-ename->vla-object (car(entsel "\nSelect block: ")))))
  (command "rename" "block" bname pause)
  );DEFUN

A minor upgrade for you Dommy on the house:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:blockrename ( / *error* ent )
  2.     (setq *error* '(( m ) (princ)))    
  3.     (while
  4.         (progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect Block: ")))
  5.             (cond
  6.                 (   (= 7 (getvar 'errno))
  7.                     (princ "\nMissed, try again.")
  8.                 )
  9.                 (   (= 'ename (type ent))
  10.                     (if (/= "INSERT" (cdr (assoc 0 (entget ent))))
  11.                         (princ "\nSelected object is not a Block.")
  12.                     )
  13.                 )
  14.             )
  15.         )
  16.     )
  17.     (if ent (command "_.-rename" "_B" (vla-get-effectivename (vlax-ename->vla-object ent)) "\\"))
  18.     (princ)
  19. )

craigr

  • Guest
Re: Block Editor Rename?
« Reply #13 on: August 24, 2012, 07:37:22 AM »
Sometimes I feel like 'the red-headed stepchild' with you FULL CAD people.

:)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Block Editor Rename?
« Reply #14 on: August 24, 2012, 08:26:57 AM »
< .. >

A minor upgrade for you Dommy on the house:


What other options are there ?

:)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.