I have a problem with a script that I am writing that batch imports many 3dm files and orients them. I am using “rs.Command(‘_-Insert File=Yes LinkMode=Embed ‘+file+’ Block _Enter 0,0,0 1.0 0.0’).”
However, the script is interrupted by a block name conflict. Is there any way to bypass this prompt using the code? I want to use the “model block” option.
^Yeah I would love to know if that was ever resolved since it appears to be the exact same issue I am having. I will try to make a sample in the meantime.
It is, and we are still running into this problem every day. Just came into office seeing a command not run overnight because it prompted that window at the fourth element is kind of frustrating as it does not seem that hard to provide a solution.
@dale I have no doubts you can fix that. Unfortunatly I can not send you any of the files I’m working on currently. In the meantime, it would really help if you could somehow make the dialog options accessible to control from a plug-in or the like. This way we could just override it until there is a fix.
Instead of the below prompt, it would be great in there is an enum in rhinocommon, which lets us choose what to do when the methods InstanceDefinitionTable.DestroySourceArchive() or InstanceDefinitionTable.ModifySourceArchive() is used
Hi @dale,
I have attached 2 videos of the behaviour, and also the relevant files in which this occurs. There are 3 linked and embedded blocks in the Main_File.3dm, which are BLock_2, Block_A and Block_B. I had updated Block_A.3dm and then also updated the BLock_2.3dm afterwards. But when I open Main_File.3dm, the prompt shows up no matter in what order I update the blocks. And if at all there are 3000 different blocks just like BLock_2 in the file(which all have Block_A inside them), the prompt will show up 3000 times !!
Thanks for the sample. I can see that from a user’s perspective the conflict feature is working as expected.
However, this is the Rhino Developer category, and there come comments about InstanceDefinitionTable and the conflict dialog appearing.
In order for me trace the path to why this dialog is appearing while running some RhinoCommon code, I need some RhinoCommon code that I can run here that repeats the problem. Does this make sense?
Dale,
Here is a setup that mirrors what I am trying to do. If you open the file “assembly” and run the included python script (after changing the file path specified in the script). You will see that it will continuously prompt the user with the dialogue box, and even though this is functioning properly, I am looking for a way to override the interruption of a pop-up somehow.Block Conflict.zip (489.2 KB)
I am curious if there was a resolution to this problem. I am having a very similar experience. I get the same check box and have to click ‘Both blocks’ and ‘Do this for all block name conflicts’ repeatedly (100’s of times). Once I am done with this task, all blocks are loaded and are correct, which leads me to think that it is unnecessary for this command to pop-up repeatedly. The option to override would be very convenient.
I am also suffering from this same issue. Block name conflicts interrupting automated file inserts.
Because I don’t care about preserving block information, my solution right now is to explode all block instances and delete all block definitions before each _-Insert using this function:
def explode_and_delete_all_blocks():
blocknames = rs.BlockNames()
for bn in blocknames:
instances = rs.BlockInstances(bn)
for inst in instances:
rs.ExplodeBlockInstance(inst)
rs.DeleteBlock(bn)
Hi @dale,
is there any update on this issue?
I am having the same problem when trying to update nested linked blocks.
I would say that it’s basically not a poblem to press a button in that dialogue, but it would be very nice to have that as an option in the inline version of the Blockmanager command.