Managing Blocks and Inserting them with C# - Should we version name the block?

Managing Blocks and Inserting them with C# - Should we version name the block?

sarahC6DTR
Enthusiast Enthusiast
416 Views
1 Reply
Message 1 of 2

Managing Blocks and Inserting them with C# - Should we version name the block?

sarahC6DTR
Enthusiast
Enthusiast

My team is configuring some code that will insert dynamic blocks that I make using .Net API.

 

I would like to see what the pros and cons of version naming my blocks or to assign one master name to the latest block.

 

This is one scenario of the type of blocks we are creating:

1. We insert a shearwall block which contains information such as length, shearwall type, etc.

2. This code would then insert it and define the length and angle of the block.

 

If we have a master name, we avoid needing to update our code when a block is updated with big changes.If we happen to do an update whilst being on a drawing that contains the previous block, then having a master name would require me to redefine the old block(s) once we need to insert the new version. This often results in either a reset of the block or a loss in attributes (if that was updated in the new block - it depends on what what alterned in the block). 

 

If version naming is not recommended, how can we go around inserting blocks whilst not redefining older blocks in a drawing? What are other possible issues we may run into if we choose not to version name our blocks when inserting them using code.

0 Likes
417 Views
1 Reply
Reply (1)
Message 2 of 2

paullimapa
Mentor
Mentor

One of the advantages of using blocks is so that when there’s a change the block can be redefined and every instance is automatically updated. If you add to the block name when there’s a change then you’re creating a new block. You’ll then have to provide an option to keep all previous versions as they are or provide a method to update all or select which versions to update and etc. now this would end up being more chaotic than ever


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos