Is there a way to add information to Blocks in C3D using dynamo so they can be identifiable individually?
I.E. If you had 15 blocks representing valves on a project site, can dynamo be used to number them 1-15? And then use that numbering to generate labels? Final step would be export Name/Number and Northing/Easting to a spreadsheet. I’m not sure if something like this is really possible with just block references and not utilizing the C3D parts (in the case of a valve).
Sounds like a good use for block attributes. If you don’t want to see the value of the attribute, you could make it invisible:
Or put the attribute on a no-plot layer so it’s visible for the user but doesn’t show up in your plans.
This could all be accomplished with property set data as well. Just different buckets for the same information. Then you could use Dynamo to read the data from the block references and generate the labeling.
Thank you for the tip! Could you provide a little info on the difference between a block and block references in C3D? I see you have a whole host of nodes put together for block attributes, but I don’t see how I can get those to work with a block reference? Could you provide an example using your node AttributeDefinition.ByBlock to create an attribute for a block reference on say a valve?
Blocks are the core building blocks (pun intended) in AutoCAD. They are simply collections of other objects. So that is why model space is actually a block! And each paper space layout is also a block. The block definition is what you are editing when you use the block editor. When you insert a block, you are creating a reference to the block definition, which is a block reference. The confusion for most people is that “block references” are usually just referred to as simply “blocks.”
A block definition can contain attributes. Following the naming convention, those are called attribute definitions. Then when you create a block reference, it creates references to those attribute definitions, which are called attribute references. The attribute references are what allow each block reference to have unique values for the attribute.
Does that help?
Thank you for that info. Another question on this topic. Can attributes definitions be updated for blocks already existing in a drawing?
If I was sent a drawing that contained a bunch of blocks references for storm drain manholes could I add and update an attribute for those that would name them separately? (MH-1, MH-2, MH-3, etc). Or does the attribute definition have to be set before the block references are created, and then you can go in and modify after? Hopefully that question makes sense.
Yep, you can add/remove attributes whenever. That’s the power of blocks - one source of information for all of the references. Just remember to use ATTSYNC after making attribute edits.