View Full Version : Annonymous Blocks??
StykFacE
3rd Apr 2007, 04:27 pm
Is there a way i can name an Annonymous Block so i can use REFEDIT? the block comes up as *UXXX (X = number) and although i've always known about them, but i usually never have to do anything with them, and i would REALLY like to edit this drawing i just recieved. Thanks all who help. 8)
dbroada
3rd Apr 2007, 04:46 pm
Not sure (just shut down to go home) but try RENAME. You get a dialogue box up - select Blocks and the one you want to rename then type in a new name and press Rename!
StykFacE
3rd Apr 2007, 04:52 pm
tried that. the *UXXX blocks don't show up at all. any other suggestions? lol 8)
asptamer
3rd Apr 2007, 05:30 pm
I thought those disappear after you PURGE?
StykFacE
3rd Apr 2007, 05:38 pm
nope. it's still a selectable object within AutoCAD so it won't purge.
dbroada
3rd Apr 2007, 05:48 pm
home now but no ACAD so suggestions only...
can you use BEDIT instead of REFEDIT? You will have to preselect the block first though.
The only other thing I can think of is a routine MAY work but the * being a wild card is the problem. I know I've done it in the past so it isn't impossible, I just can't remember how. I'll check my VBA routines tomorrow in case I still have the code.
StykFacE
3rd Apr 2007, 06:02 pm
koo, thanks Dave. yeah i can't do anything with BEDIT either. lol
dbroada
3rd Apr 2007, 06:25 pm
one last thing :D, have you a sample anonymous block I can try - I can't remember how they happen.
StykFacE
3rd Apr 2007, 06:27 pm
PM me your email and i'll send ya the file. :)
dbroada
3rd Apr 2007, 07:42 pm
Hows your VBA? :)
Public Sub ReNameBlock()
Dim i As Integer
For i = 2 To ThisDrawing.Blocks.Count - 1
If Left$(ThisDrawing.Blocks.Item(i).Name, 1) = "*" Then
ThisDrawing.Blocks.Item(i).Name = Mid$(ThisDrawing.Blocks.Item(i).Name, 2)
End If
Next i
End Sub
Open the VBA editor and paste that into a new module then run it. Report back if that helps. If it does I'll explain it a bit more.
Actually that only renames them - it doesn't change them from anonymous. :(
CarlB
3rd Apr 2007, 08:00 pm
There's a lisp routine to convert to a named block, "unanon.lsp", at http://www.draftsperson.net/index.php?title=Anonymous_Blocks_in_AutoCAD
StykFacE
3rd Apr 2007, 08:01 pm
i've opened up the VBAIDE from AutoCAD but i can't seem to figure out how to create a module.... the help file isn't that great either. man i feel like a noob now. lol
dbroada
3rd Apr 2007, 09:18 pm
VBA lesson first.
from the Insert menu select Module.
You will get a blank area with (General) & (Declarations) drop down boxes. This is the area you paste my code.
Click on the blue arrow or press F5 and the code (ReNameBlock) will run.
Now the bad news. That just renames the blocks but doesn't render them any more available.
However the code CarlB points to does work. I'll have to examine it and try to find out why they work differently.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.