# AddBlock / InsertBlock - one before the other?

**URL:** <https://discourse.mcneel.com/t/addblock-insertblock-one-before-the-other/17171>\
**Category:** Scripting\
**Created:** [February 27, 2015, 4:08pm UTC](https://discourse.mcneel.com/t/addblock-insertblock-one-before-the-other/17171 "2015-02-27T16:08:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikingasia](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vikingasia](https://discourse.mcneel.com/u/vikingasia)\
**Post date:** [February 27, 2015, 4:08pm UTC](https://discourse.mcneel.com/t/addblock-insertblock-one-before-the-other/17171/1 "2015-02-27T16:08:48Z")

</div>

I’m trying to ‘InsertBlock’ - but in the “IronPython Index” entry it says: “Inserts a block whose definition already exists in the document.”

Seems like it is saying Only “Insert” if the ‘block’ is already IN the document?

so (to me anyway) that implies I have to use “AddBlock” before I use “InsertBlock” - but I want this ‘InsertBlock’ to happen in an ‘empty’ file (new (…3dm) file with template (template only ‘configures’ the grid)

(that is, I’m attempting, (under Python control) to ‘build-up’ a ‘model’ that is a succession of ‘InsertBlock’ steps; and all the blocks are already defined and saved as …3dm files))

BUT - when I use “AddBlock” it tells me I need to ‘Insert’ first?

What (important thing) am I missing? (something about Adding / Inserting in the correct order?)

MAYBE I need to do something inside each of the …3dm files that I am attempting to ‘InsertBlock’ as?

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [February 27, 2015, 4:52pm UTC](https://discourse.mcneel.com/t/addblock-insertblock-one-before-the-other/17171/2 "2015-02-27T16:52:13Z")

</div>

The problem is the terminology… There are Block _Definitions_ and Block _Instances_. InsertBlock inserts an _Instance_ of an already existing _Definition_.

AddBlock only adds a block based on objects that exist in the document, not from external files. So, you’re probably going to have to script rs.Command("\_Insert…") to insert blocks from a external files…

–Mitch

---

<div class="post-metadata">

**Author:** ![vikingasia](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vikingasia](https://discourse.mcneel.com/u/vikingasia)\
**Post date:** [February 27, 2015, 7:21pm UTC](https://discourse.mcneel.com/t/addblock-insertblock-one-before-the-other/17171/3 "2015-02-27T19:21:17Z")

</div>

Mitch,

O.K., that’s something along the lines of what I ‘figgereed’ - -

I’m ‘fum da souf’ - so I FREQUENTLY have grammar problems

(we will NOT go into how many times I repeated English Grammar class in both high-school-and-college (it’s an embarrassing number!)

ENGLISH FREQUENTLY gets me into trouble -

SO - I will research more on ‘ rs.Command(“\_Insert”) ‘ and re-post, if necessary, within a day or two - I have the TIME, now-a-days - being semi-retired (semi-retarded, some say)!

thank you (VERY MUCH) for ‘POINTING me in the RIGHT DIRECTION’!!!

VERY Sincerely yours, VikingAsia!

=====================================================================================
