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. AutoCAD blocks inserted with MINSERT cannot be exploded directly. But you can use a combination (sequence) of the FLATTEN and EXPLODE commands to explode a 'multiple-insert' block reference (Flatten is a Express Tools command). 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: 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.
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.
Autocad Unblock 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.
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.
Autocad Remove Block Reference
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.
How To Unblock A Block Reference In Autocad Free
Start Free Account
Start learning AutoCAD and Fusion 360 with video courses, eBooks and Q&A community