1. How can you tell that Bolts_DYNAMIC BOLT.dwg is a reference and not the dynamic block itself.
Because on opening the drawing, I am presented with a
reference of the dynamic block inserted into Modelspace, rather than the components of the dynamic block
definition (i.e. lines, arcs, parameters etc) displayed in the Block Editor - just as you might open the source drawing for a standard (non-dynamic) block and find the lines/arcs/etc constituting the block definition rather than a reference of the block itself.
2. That's the second time you mentioned WBLOCk but I still don't understand the concept. One of the things it does is it takes the elements and places them in a separate file. But I already have a separate file. I tried WBLOCk on Bolts_DYNAMIC BOLT.dwg to create another file, and inserted again from the menu but could not see any difference. I didn't get the prompt "Open in Block Editor".
You have a separate drawing file into which a
reference of the dynamic block has been inserted, not a separate file representing the dynamic block
definition.
Perform the following steps exactly, and you'll see the difference:
- Open Bolts_DYNAMIC BOLT.dwg
- Ensure no objects are selected
- Invoke the WBLOCK command at the command line
- Change the radio button to 'Block' and choose 'bolt' from the drop down.
- Specify an output drawing for the definition (e.g. 'bolt.dwg')
After generating the new
'bolt.dwg' file, try opening this file in AutoCAD, and then try inserting this file as a block into AutoCAD (either using the standard
INSERT command or your program).
3. With your last note that the existing drawing contains a reference and then it becomes nested ... with the other reference drawings such as 530UB82.0, these are just lines and arcs but they become a block when using the routine "BlockInsert".
Exactly - note that this behaviour is nothing to do with your AutoLISP program, but simply the standard behaviour of the
INSERT command in AutoCAD. When using the
INSERT command and selecting your drawing file, the content of the selected drawing file constitutes the block definition and a reference of such definition is inserted into the drawing at the location, scale & rotation that you specify. If the selected drawing file to be inserted contains a block reference, then such block reference will be nested within the block definition in the main drawing - this is standard behaviour for
any block, not only dynamic blocks.