Get block name while in block editor

Get block name while in block editor

Anonymous
Not applicable
1,757 Views
5 Replies
Message 1 of 6

Get block name while in block editor

Anonymous
Not applicable

I am trying to find a way to retrieve the name of the current block i am editing while inside block editor. I have a routine to quickly enter block editor that saves the name for me but sometimes i use block editor the regular way. If i just enter block editor normally i dont have a name saved so i need to know how to get the name of the block i am currently editing while i am inside the block editor. Thanks

0 Likes
1,758 Views
5 Replies
Replies (5)
Message 2 of 6

hencoop
Advisor
Advisor

I have checked all of the system variables and all of the string values stored as symbols in the atoms-family and none of them expose the name of the block currently being edited in BEDIT.

 

Perhaps you could redefine BEDIT so that it captures the name of a block you have selected when you call BEDIT.  You could have it tell the user to select a block first if no block is selected when it is called.  I don't think you will be able to get the block name if it is selected from the block list in the dialog after starting BEDIT.  

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
Message 3 of 6

Kent1Cooper
Consultant
Consultant

@chaddeems wrote:

.... i need to know how to get the name of the block i am currently editing while i am inside the block editor. ....


By "get" do you mean you need to extract it to use it somehow in the process of editing the Block, or do you just want to be able to see the name of the Block you're editing?  If the latter, the Properties box shows you that, even while in the Block Editor:

BlockName.PNG

Kent Cooper, AIA
0 Likes
Message 4 of 6

pbejse
Mentor
Mentor

@Kent1Cooper wrote:

@chaddeems wrote:

.... i need to know how to get the name of the block i am currently editing while i am inside the block editor. ....


By "get" do you mean you need to extract it to use it somehow in the process of editing the Block, or do you just want to be able to see the name of the Block you're editing? 

 


If YES use REFEDIT instead of BEDIT , while inside the editor you can extract the current block name with (getvar 'refeditname)

REFEDIT works not just for XREF but regular block as well.

 

Source: A Top Secret Command for Editing Your Blocks 

 

HTH

 

0 Likes
Message 5 of 6

Anonymous
Not applicable

I have refined BEDIT to grab the block name before it enters the block editor but that does not work for the dialog box. Sometimes i have to edit nested blocks so i open them from the dialog box. I was just hoping there would be a system variable like refedit has. Thanks for your fast and detailed response.

0 Likes
Message 6 of 6

Anonymous
Not applicable

Ok i think i have an idea how to make this work but i still need to retrieve some information while in the block editor. I can make it work if i can get the list of visibility states and the current visibility state. I dont know if the information is available while in block editor. Any help would be greatly appreciated. Thanks

0 Likes