Amiginho Rafita @gabrielrafaeln buenas, this is complicated and it is easy to get lost I will try to explain correctly, each Block Reference has a list of Attributes, each time you insert a Block you create an element or instance and each block can have its own value in each Attribute, what you have to pay attention to is the depth of the lists you are working with so if you give the same list the names of the attributes and you give a list with the same depth of values it will insert each value in each attribute. example:
This code circled in green, these tags are the tags of my block that I insert manually, precisely to read all the tags of the block and insert it in the next blocks that are created (the idea is this kk)
this red arrow is the positions that are the attributes
Amigo @gabrielrafaeln buenas, there is a couple very usefull old command that i used a lot before begin whit Dynamo Attin / Attout, they alows you in out the data from autocad to an .txt file, then you can use excel to modify the information, check a little bit how this works to better understand how Autocad manage the information, here’s what an export time of a block looks like!!
Friend @gilberto.arechigaiba , I do it manually this way. I insert the blocks manually at the desired points, then I insert the unique name of the block (which in this case would be the name of the drillhole), I export txt through the command “export attribute”, then I take it to excel and, in excel, I insert the information I need in each block and I import it back into my drawing using the “import attribute” command.
Amigo, try this: Use List.GetItemAtIndex to split your list of Tags (attributes) and use 1 node BlockReference.SetAttributeByTag for each Tag, and feed the values whit the list of values corresponding to the tag.
This way my code works, but I need to think of a way to optimize it… because there are more than 100 tags (attributes) kkkk… it will become an extremely large code… I’ll see if I can find a solution about it and post it here!
Amigo @gabrielrafaeln buenas, I am glad to hear that you are improving and that my tips are working, if you work if you have a very long list of attributes with this method you will have to use multiple instances of nodes and it is true it will become complicated to handle, try the following: use the List. Chop node with Length = 1, to transform your list of Attributes (Tags) of N elements in a list of N lists, so you assign to each Attribute (Tag) its own list of Values, your SetAttributeByTag node must work with levels and that is quite complicated you must go very deep into the dark side , good luck.!!
Sorry for the delay in getting back to you, but every day that passed I studied the code in order to make progress.
I even downloaded some extensions (packages) in order to help me in this study, but without much success…
I did as you instructed me, it worked more or less right for me, but I am not able to relate the attribute values to each tags of their respective blocks (polls)
1st - I am generating two blocks in the profile, according to coordinates and stake and in the correct dimension.
2nd - in my excel there are values (attributes) for the polls that are in my profile
3rd - I am not able to relate the value (attribute) 01 of tag 01 of poll 01, in the same way I am not able to relate the value (attribute) 02 of tag 02 of block 01.
just as I am not able to relate the value (attribute) 01 of tag 01 of poll 02, in the same way I am not able to relate the value (attribute) 02 of tag 02 of block 02.
the way you guided it makes sense, because each list would be a tag, but I did the same with the attribute values and it didn’t work very well… they didn’t “talk”.
Amigo @EdwinG_HMV, srry for the delay, long story short is that Attributes Belongs to Block so Each Block that you insert needs a sublist of Attributes and each Attribute needs a sublist of Values, I let you an example, you will have read all the topic of list of list in dynamo Primer, make attention in lacing and levels topics, But as i said before Levels are the path to the dark side, good luck!!
Amigo @EdwinG_HMV Take a closer look to the levels and lacing, i strongly sugest to explore and understand about this topics is very easy to lost and frustrate using those if you don’t understands quite enough!!