Background: we need two things.
- linked blocks
- editing blocks “in context”
I wrote a function in python that exports all the blocks to different subfolders depending on their name, and then link them to this fresh export. So we set all the blocks to Embedded and linked, we can edit the block’s embedded version, giving us access to the context (add/remove objects, and just seeing what’s around), and then launch this function. And this is great!
But, I wanted to make this automatic, whenever a block is modified or renamed, and for some reason I cannot. success
is always False
when this code runs in an InstanceDefinitionEvent handler.
# ...
export_command= '_-BlockManager _Export "{}" "{}" _Enter _Enter'.format(idef.Name, file_path)
success = rs.Command(export_command)
# ...
Any idea why, anyone? Thanks.