I have a simple block containing a circle and an attribute definition. When trying to place block references at x,y coordinates specified in an Excel file, the inserted block references are stripped of the attribute. Has anyone else had this issue?
When checking the Document.BlockByName node to see if it has attributes, the Block.HasAttributeDefinitions node returns “true”. Doing the same check on the BlockReference.Create node returns “false”.
Hi @Paolo_Emilio_Serra1, thanks for the quick reply. I tried using the CoordinateSystem.ByOrigin node instead of Point.ByCoordinates and then feeding that into BlockReference.ByCoordinateSystem. I got the same result - the block references have no attributes.
@zachri.jensen@olsen Could you please share the Block Reference? also can you confirm that if you insert the block references manually the attributes are still there?
@zachri.jensen@olsen I had the chance to test it and yes, when you create the block reference you initially have the result of BlockReference.HasAttribute() equal to false, but as soon as you set the value everything works as expected and if you test the BlockReferences again they return true.
Thanks @Paolo_Emilio_Serra1. So what I’m seeing is that you either need to set attributes in Dynamo or run ATTSYNC after they’ve been placed. Is that correct? My original goal was to use Dynamo only for the initial placement of blocks in model space, and then set individual attributes values afterwards. But it looks like Dynamo will not insert a block while also setting the default value for an attribute.
Hi Paolo,
I am struggling with the similar issue although I’ve got some problem with the tag definition. I thought this can be a simple string, but it is somehow not taking. Can you please share how did you define the tag field?