How To Unblock A Block Reference In Autocad

If Bill of Material (BOM) in AutoCAD drawing are in 'Block Reference', to read BOM using pyautocad we can read it using following code. From pyautocad import Autocad acad = Autocad for obj in acad.iterobjects('Block'): if obj.HasAttributes: obj.GetAttributes But it throws exception in. At first: which version of AutoCAD are you using? At tried your code on a german AutoCAD 2008. I created some simple blocks from polygons and inserted them into a new drawing. When I execute your code above and select one of those blocks, I always get valid coordinates. So this might be an issue, how you created the block? AutoCAD Block list. Shows the AutoCAD Blocks available in the drawing. The default order is the same as the browser. Click to a symbol to select it. Contents can be sorted using drag and drop or right-click in the list and choose Sort by Name. Sets the scale for the block, relative to the drawing sheet. Jan 03, 2014 May i know how can i unblock my block?! I got 3 floor in my drawing, when i select each of my floor, it automatic select all of my floors by 1 click. May i know how to make it separately each floor by floor, because i need to copy floor by floor only.

The usual method which comes to mind for selecting a nested object is by exploding the block and then copying components. But that is a destructive approach and it is not recommended in most of the cases.

Another method of copying objects from blocks is by opening block editor and copying components of the block from there. For x-ref, you can type XOPEN press enter then select the referenced file to open it in the current window and then copy paste component from the reference file.

But in this article, I will tell you about an easier and nondestructive method for copying nested objects from blocks and X-ref using NCOPY command.

Using NCOPY:

Type NCOPY on the command line and press enter to start the command. Now click on the object which you want to copy from block or X-Ref and press enter. Then specify a base point to pick the copied object and click at destination point to paste the selected object.

How To Unblock A Block Reference In Autocad Excel

A similar approach can be used for copying nested objects from X-ref, see image below for more.

Insert and Bind options:

When you select NCOPY command and select settings from the option of the command line you will see a prompt as shown below, here you can decide whether to insert or bind copied objects.

By default insert is selected, when you select Insert the newly copied objects will be placed on the same layer on which object was initially present in source drawing. If the layer is not available in current drawing then AutoCAD will automatically create the layer with same name and properties and place the object on it.

When you select bind a new layer will be created with the name that follows syntax “drawing name $XX$ layer name of source drawing” where XX is the number assigned automatically.

Do you have questions related to this tip? let me know in comments below.

Start Free Account

Start learning AutoCAD and Fusion 360 with video courses, eBooks and Q&A community


Similar Messages:
ADVERTISEMENT

AutoCAD 2010 :: Block Control In Reference Drawing?

Jul 29, 2011

I'm using Architecture 2011, but the problem is pretty generic.
I am working with a very complex vendor drawing and using it as an xref to my working drawing. I need to be able to freeze parts of the xref and change colors (for plotting purposes) of other parts. Under ideal circumstance this would require simple layer manipulation.
My problem is that a large percentage of the vendor drawing is made up of blocks. There are nearly 1000 different blocks. Most of these blocks were created using layers other than 0 - quite often more than one layer is used. Sometimes the block is inserted on a layer that was used in it's creation, sometimes not. The only way I can omit one of these blocks from my drawing is to figure out what layer was used in it's creation and freeze that layer. You can see how this could be a pretty tedious process.
My limited CAD knowledge only gives me: edit all 1000 blocks, changing them to layer 0

AutoCAD .NET :: Inserting Block Reference Which Stored In Same Drawing / DB

Jun 5, 2012

I am trying to write a function to insert a block reference of a block definition which is already stored in the same drawing.
All threads are leads me to the way of inserting another drawing to current drawing with use of database.readdwgfile & database.insert.
How to use those methods for a block definition stored in the same drawing.

AutoCAD Civil 3D :: Reference Surface (x) Not Found In Reference Drawing

Jul 28, 2011

I am getting this error in my production drawings.
My setup is as follows:
- EG.dwg has my existing surface in it. I create a data reference to use it in other drawings.
- Level One.dwg has the EG surface data referenced in, and I use this to create alignments, profiles, and finish surface. All of these are turned in to data references.
- Storm Sanitary.dwg has my pipe designs. I data reference in the two surfaces, profiles, and alignments, and create pipe networks. I create references for these networks.
- Plan Profile.dwg is the production sheet I'm getting this error from. Every one of my civil objects is data referenced in to this drawing. Everything is inserted correctly, the pipes show correct FG surface elevations for their rims, etc.
BUT when I open this drawing, I get this error. I assume it's because my FG surface is not directly in the storm sanitary.dwg.
How do I get rid of this error, without combining drawings, or promoting the surface to one or more drawings? Isn't this exactly what data references is made for?

AutoCAD .NET :: Error While Changing Block Definition Of An Block Reference

Oct 21, 2013

I'm trying to change block the definition of an block reference.
I did something like this:
blockreference.BlockTableRecord = newBlock.ObjectId;
In most cases this works well. However I found a case that it not work as well. When I try to change the definition from a new block that I have created in my test DWG, it disappears from the model.

AutoCAD .NET :: Determine If A Block Reference Of The Block Exist

May 3, 2012

I have a block: “Block_A”. I am trying to determine if a block reference of the block exist.
Currently I would iterate every block Reference in the Block Table, and then dig deep into each block ref . . . . .
I was wondering if I could just take “Block_A” and see if it has reference and where the references are. Perhaps this is just wishful thinking but I was hoping for a faster way to obtain the references then to iterate thousands of blocks in each table record.

AutoCAD .NET :: Insert Block Reference Using Block Name

Nov 17, 2012

Drawing contains a block with 'BlkName'. I want to insert blockreferences of this existing block using .Net. All shows how to insert a new block and then use the BlockID returned by the insert function. In my case I only have the block name and there is no Block id. How to get it or how to create a block reference of an existing block?

AutoCAD .NET :: Polyline 3Ds In Block Reference

Jan 11, 2013

I have a weird problem with exploding block reference with vb.net as follows.
When I use BR.explode(DBObjectCollection), and append the entities in the object collection to model space,
the 3d Polylines inside the block reference do not get appended and I do not get any kind of error. The reason for this eludes me as of yet. (remember, simple polylines and lines and other objects do get appended to model space)
When I use BR.explodetoOwnerSpace(), the block reference explodes as it normally is expected to, but then I have no way to collect the objects from the exploded BR.

AutoCAD Map 3D :: Block Reference Scale

Sep 27, 2012

I'm working with two different drawings to import Layers for Lot Grading and when I'm importing the Block Reference from the origin file, it's setup as Linescale 0.5, but when I import into my regular basemap, which is setup for Linescale 1, the text size is double what it should be.

AutoCAD VB :: Block Reference Rotation

How To Unblock A Block Reference In Autocad 2016

Oct 22, 2013

I'm trying to write a vb script to extract information from the CAD drawing. While testing, i found that for some drawing blocks, the corresponding AcadBlockReference Rotation returns 1.57, but when i look at the actual drawing, block properties, the rotation is 0.

AutoCAD .NET :: Selecting In Block Reference?

May 11, 2010

i need to use something with similar effect to Editor's method SelectCrossingWindow, but i need it to select object in Block Reference. How can i do that?

AutoCAD .NET :: Block Reference Attributes

Jul 13, 2012

I have a block reference in a dwg that is a like a form, for example:
Written By: Diogo
Author: Diogo
Date: 13-07-2012
State: Check-in
In autocad this is a block, and on the attributes of the block reference I only can edit State and Author, and i would like to get all values. Because i want to fill those values of Written By, Author, Date and State by code. I can reach the attribute collection of the block but i only can see the State and Author.

AutoCad :: Explode A Reference Block?

Jun 14, 2011

is ter any way to explode a reference block

AutoCAD .NET :: Select Block Reference By Attribute Value

Nov 29, 2012

I have a drawing with many block references on it and they have some attributes.
I know how to find the block reference witch the attribute value, and even change it but I don't know how to select it once I have the object ID of the block.
How can I do the selection without asking the user to select it?

AutoCAD 2013 :: Label Block Reference

Aug 2, 2013

I wonder if this can be done. i have a number of blocks which have labels to them i.e. JW1, JW2, JW3 etc. which corresponds to the block name. Is it possible to have the label automatically referenced to the block name so if i change the block name to JW10 the label within the block changes to JW10 as well.

AutoCAD .NET :: Get Block Reference Information Error

Mar 21, 2013

I get a block reference (has attribute) from other drawing as code follow:
Public Sub GetBlock_Info() Dim blockName As String = 'test' Try Dim doc As Document = Application.DocumentManager.MdiActiveDocument Dim doclock As DocumentLock = doc.LockDocument() Dim ed As Editor = doc.Editor Dim ofd As New OpenFileDialog('Select Drawing', Nothing, 'dwg; dwt', 'ATS detai drawing', Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags.DoNotTransferRemoteFiles) Dim dr As
[code]..........

AutoCAD .NET :: How To Fill Color For Block Reference

Sep 9, 2013

i have a .dwg fille with some block reference.
I want to fill color for block reference, but when I debug to hatch.appendloop function, I get message eInvalidInput, and block don’t fill color.
This is my
[CommandMethod('FillColor')]
public void FillColor()
{
Document doc =
Application.DocumentManager.MdiActiveDocument;
Editor ed =
doc.Editor;
Database db =
HostApplicationServices.WorkingDatabase;
Transaction tr =
db.TransactionManager.StartTransaction();
[Code]....

AutoCAD .NET :: Change Block Reference Attribute

Mar 7, 2010

I have an issue regarding nested entity.
I have a nested entity block reference. In this entity I have three blocks. if I change any of the block reference attribute definition in the nested block reference then it is changing the original block itself.
Actually I am getting the handle of the selected block reference in the nested Entity. and change the attribute reference later. but it is making change in the block itself and other block reference too.
Here is my
static public void CONTACTS()
{
Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
string contactName = string.Empty;//to hold contact name, from xdata
[code].......

AutoCAD .NET :: How To Locate Text Near Block Reference

How To Unblock A Block Reference In AutocadMay 24, 2012

I have tried to use intersectwith to locate text (MText or DBText) near a block reference. Some times it works and some times it does not. The hard part for me is understanding why it occasionally works when most examples are just duplicates with modified text and attributes.
My block reference has 4 attributes to the left (Right Justified) of a circle and 2 attributes inside the circle. The text objects are used by some CAD operators instead of the upper 2 lines of attributtes. (Guess they dont know how to modify attributes) I want to locate these texts and insert text into the corresponding attribute.
Block Reference:
Att 1 |''''| <-- CAD User will insert a txt over Att 1 and Att 2,
Att 2 | | <-- both attributes are usally left blank or contain a space
Att 3 | |
Att 4 |.....|

AutoCAD Inventor :: Title Block Reference?

Apr 5, 2012

I have text in my title block that references part properties. If I have several different part and assembly base views on a sheet, how do I control which one the title block references? It defaults to the first one that was placed. I am using 2011 Pro.

AutoCAD .NET :: Get Block Handle From Attribute Reference?

Sep 21, 2011

Is is possible to get the block handle from an attribute reference? I get the attribute reference from a previously stored attribute collection. I did try attref.BlockId.Handle.Value.ToString(), but it gives a different value, not the block's id.

AutoCAD .NET :: Move Block Reference Up Or Down Vertically

Apr 23, 2013

I need to select a block in AutoCAD, and move it up or down vertically. I can get to the point where I have the user select a particular block, but after that, how do I get a reference to the block selected so I can move it up or down?

AutoCad :: Delete Objects In Block Reference?

Feb 7, 2013

I have a block that I use as hatch (using superhatch), so the block appears several times. At the border of the hatch I want to fix some of the lines.
If I try to ungroup & explode the hatch, then the block appears outside of the hatch boundry.
So my question is if I can fix the lines so the hatch remains whole.

AutoCad :: Using Dynamic Block As External Reference

Dec 2, 2013

Is there a possibility to use 'Dynamic Blocks' as an 'External Reference' having the ability to use their features at the same time?
The thing is I have dwg1 and dwg2 files and in them I use 'Dynamic Block1'. Whenever I update 'Dynamic Block1' in one of the dwg files I have to go to 'design center' and update the 'Dynamic Block1' in other dwg file.

AutoCad 3D :: Subtracting A Reference Block From A Solid?

Jul 26, 2013

AutoDesk 2014 . I am currently trying to design in iphone case. So I downloaded a replica iPhone from grab cad:
how-to-unblock-a-block-reference-in-autocad.html
I imported it and formed a solid around it, now I am trying to subtract the phone from the solid so it perfectly fits within the case. It will not let me subtract it though because the phone is a reference block and the square around it is a solid.

AutoCAD .NET :: Using Block Reference As Point Symbol?

Jun 6, 2011

I create a set of points in a drawing and create each point as a block reference containing the point, text and probably something else. Also I would like to use different symbols for points and each of the symbols is defined as a block definition, and for each point I create a block reference according to the symbol type. The question is if is there any way to 'combine' block definitions/references? I mean, I have common block definition for all points, whis defines somethin common for all of them. Also I have different symbols for each type of points and each symbol is defined separately as a block. But when a final point is created (containing common definitions and type-dependent symbol) I want to have it as a single block.

AutoCAD .NET :: How To Iterate Through Items Of A Block Reference In Dotnet

Apr 13, 2013

I'm a newbie in dotnet and want to now if is possible to iterate through items of a block reference.
My problem is the following : I explode a block reference in dotnet (it works well) and I want to change the items layer that compose the bloc reference. It's the reason why i need to browse items of this block.

AutoCAD .NET :: Selection Filter On Block Reference XData

Apr 12, 2007

I'm trying to use a Selection Filter on Block Reference XData value. But I get no hits, it works fine with Lines and Polylines that has the same kind of XData.
Is it a bug or do I have to define my Selection Filter differently when working with Block Reference?
Here is a part of the code :
TypedValue[] flt = new TypedValue[]
{
new TypedValue(-4, ' new TypedValue(-4, ' new TypedValue(8, 'POLYLINE_LAYER'),
new TypedValue(1001, 'Object_Id'),
new TypedValue(1000, '166448'),
new TypedValue(-4, 'AND>'),
[code].......

AutoCAD VB :: Updating Block Reference After Making Changes To Definition

Aug 23, 2013

I have a small vba sub wich changes the color and layer of all entities inside a block. It seems to work pretty well for the majority of blocks, but then if I try that on a dynamic block, the definition is correctly altered, but the references aren't updated...
I know for a fact that the definition has been correctly modified because if I type bedit, I can see the definition is modified. Then, in the block editor, if I save the block, the references are correctly updated.
How to force references to update after I made the modifications inside the definition ?
I searched for methods within the VBA Reference and I tried blockRef.Update but it doesn't seem to have any effect.

AutoCAD .NET :: Unable To Access Block Reference In Database

Nov 23, 2012

I inserted a block from a dwg drawing with the following method:
public static ObjectId InsertBlock(string fileName, Point3d insPoint) { var acadDoc = Application.DocumentManager.MdiActiveDocument; var blockId = default(ObjectId); using (var acadLockDoc = acadDoc.LockDocument()) { var dbTemp = new Database(false, true); dbTemp.ReadDwgFile(fileName, FileShare.Read, false, '); var blockName = Path.GetFileNameWithoutExtension(fileName);
[code]........

AutoCAD 2013 :: Turn Off Block Reference Dialogue Box?

May 23, 2013

how to turn off the Block Reference Dialogue Box that appears when you put your cursor over and object or text?