Block name conflict detection

I have a block with a certain name in my file. I am trying to import another file which has similar block name. Now because of this, i get “Block name conflict” prompt, which makes sense because there are two blocks with same name.

When I import the file, is there any way I could know that this prompt is going to show up? Probably some changes happening in InstanceDefinitionTable Class, or ObjectTable Class ?

I am trying to use RhinoApp.Idle event handler, so I could detect the conflict just before the “block name conflict” prompt is going to show up, but Im not sure where exaclty to look for.

Hi Darryl

What language are you developing in?
You could load the file with rhinocommon Rhino.FileIO
You can than read the instance definitions from that file and anticipate on name conflicts.

Does that make sense?


@Willem I am using c#.
Yes, i am using Rhino.FileIO to read names of InstanceDefinitions first. But the thing is, there is a probability that there is no conflict even if the block names are same (for example the blocks are linked to same file, which I cannot check using FileIO). So this is why I am importing them,first.

Most of the times the conflict doesnt occur. But in some cases, it does, and when it does, i have no control over it from Rhinocommon, and I have to click using mouse manually. So i was thinking, if at all there is a change in property in one of the Rhino.DocObjects.Tables just before the Conflict occurs, I could probably change the block name temporarily, so as to avoid the prompt

Hi Darryl,

I see your point. Did you try to find a way to compare linked blocks.
There is


I’m just browsing the API doc so maybe I’m sending you on a wild goose chase…


@Willem Thanks for your suggestion. I have tried this as well. These values are not saved in 3dm archives. When I access them from FileIO, they always return 0.

Another thing is, even if the blocks are linked to same file path, there could still be conflicts (if someone has changed the block in file), so knowing their link paths is not a good option.

I have been trying for a long time to find out if I can anticipate this popup somehow, but not successful so far. It just shows up even before I know it, and then I have to use the mouse.

I suppose @dale might be the go to developer to help out in finding a way to catch these conflicts before they occur.

good luck!

1 Like

Hi @Darryl_Menezes,

I’m not sure I can give you any rules to follow, expecially in C#. What problem are you trying to solve?

– Dale

Hi @dale,
I have a huge file with a lot of linked blocks (also nested links). I want to insert another block, which is linked to a particular filepath. I do this using Rhinocommon as follows:

  • I Add an InstanceDefinition with the required name to the InstanceDefinitionTable class using InstanceDefinitionTable.Add() method, with a random GeometryBase (Eg. Point at the origin)

  • Then I use InstanceDefinitionTable.ModifySourceArchive() method to link the InstanceDefinition to a specified path

Lets say the linked filepath has 10 blocks with similar names as the ones in current document. And for one of those blocks, the “Block name conflict prompt” is going to show up (because rhino thinks it is a different block). I want to know beforehand that this prompt is going to show up, and if so, for which block it is going to show up. Is there a way to do this?
How does Rhino compare if two blocks (with same name, and linked to the same file path) are similar or not?

Hi @Darryl_Menezes,

If it possible I can get those files (or something similar) and some sample code that repeats the problem?

– Dale

Hi @dale,
I have attached the rar file with blocks, and their respective links, and also the sample command.
I have linked the blocks to the ‘Public Documents’ folder, so it is better to extract the BlockTest.rar file in the Public Documents folder.
There is a file called BLockTest.3dm, and when you run the command in this file, the prompt shows up. I want to know if there is a way to find this out using RhinoCommon

BlockTest.rar (58.8 KB) BlockTestCommand.txt (3.1 KB)

Thanks @Darryl_Menezes - I’ve logged an issue so I don’t forget to look at this.

– Dale

1 Like

Hi @Darryl_Menezes,

I have not address the YT I’ve referenced above. But I did fix this:

The fix will be in next week’s Rhino 6 SR Release Candidate if you are interest in testing.

– Dale

Hi @Dale,

I ran into similar issue with the name conflict popup - now finally it doesn’t show in the scripted version of the Insert command (which is good), however it automatically assumes to keep both blocks. In most cases we need to use “Model Block” option. Is there a way currently to use that method for non-popup scripted version? Or can a command-line option be added to define how to handle the conflicts?

EDIT: I see the dialog changed recently, no longer “Model Block” vs “File Block” options available in the non-scripted popup… only Redefine (old: File Block) or Keep Both. So above wish would be to have option to Redefine or Keep Both (we hardly even need to keep both)



1 Like

I’ve recorded your wish.

– Dale

1 Like