Blockmanager isn’t very effective in updating blocks so I wrote a small script,
but does this seem like the most reliable and effective way to do so?
import rhinoscriptsyntax as rs
blockList=rs.BlockNames()
if blockList:
n=0
nn=0
for block in blockList:
status=rs.BlockStatus(block)
if status==-3:
n=n+1
if status==1:
nn=nn+1
print ("Updating "+str(block) )
rs.Command("-BlockManager _Update "+str(block)+" _Enter")
print "File has "+str(len(blockList) - n )+" linked blocks, "+str(nn)+" updated"
print "File has "+str(len(blockList) - n )+" linked blocks, "+str(nn)+" updated"
Well, basically to ensure the best speed and stability.
I could not find a dedicated command for it and I’m trying to avoid using Rhino.Command as much as possible, so I just wondered.
We need an effective and good way to update changed linked blocks.
Blockmanager is ineffective at doing so, and it messes with the layer structure so I don’t want to use “update all” (it doesn’t remember which layers are on and which are off) so that will be the next step for the script.
Hi @Willem,
working perfectly fine.
I have a question though - and I guess it has been discussed in some other topics here.
Is there away to avoid this popup asking what to do with nested blocks?
I personally would like to chose option “Replace with imported block” all the time.
I’d love to see a solution for this in options, maybe in a separate “blocks” page in options.
I have a single embedded origin axis block inside all my assembly blocks so I can orient and align the inserted blocks easily when they are not parallel to world/cplane axis. When there are many parts in a huge assembly, it asks what to do for each sub-assembly even though I check the “do this for all conflicts” box.