Is there a way to keep a list BEFORE changes were applied?
Block references in my drawing were changed by other blocks and I want to keep a list of the names of the blocks BEFORE they were changed so I can compare the old names vs new names.
Is there a way to keep a list BEFORE changes were applied?
Block references in my drawing were changed by other blocks and I want to keep a list of the names of the blocks BEFORE they were changed so I can compare the old names vs new names.
Likely running a DataExtraction command before and then again after doing the change will get what you want.
No possible ways within Dynamo?
You could also grab the names and write to CSV if that is preferable.
The issue here is it wonât be as fast and perhaps less complete, unless youâre changing names via Dynamo was well.
Sorry, I just realized I didnât give much details. Yes, the blocks were changed with Dynamo. I just want to add the list of names before they get change in my script. But as I click run, there is no trace left of before.
You need to gather the names before you change them, then put in a watch node marked as an output, or save to another file.
Hard to illustrate where or describe how without seeing your graph though. If it helps you can imagine me asking for your guidance to deal with how my leg hurts when I do this.
You already have the list of âbeforeâ and âafterâ names in the excel file youâre loading. Why not just use that? Put a WatchNode after it and mark it as an output and youâll see the values in player.
The Excel is like a dictionnary. It just tells that Block A = Block B and the new layer. What I want is a list of the names of all blocks that are present in the drawing before they get changed.
Imagine a surveyorâs drawing. He sends me a drawing that has his blocks in modelspace. Now I want to change his blocks with my blocks. But before that, I just want a list of the names of his blocks before I change them with mine. Just like DATAEXTRACTION would do. But Iâd like to keep that process in Dynamo.
I get that youâre using the excel as a dictionary, but you already know the existing name and the new one because itâs in the excel file.
If youâre looking for it to say âOld Nameâ and âNew Nameâ once for each block, duplicate the value N times for N blocks, but that isnât very useful as column A would say âOld Name 1â 10000 times and then âOld Name 2â 10000 teims after that and column B would say âNew Name 1â 10000 times followed by âNew Name 2â 10000 timesâŚ
If you want just column 1 with the 10,000 of each name in order, pull the block from the block references, then pull the name of the block. The use of that⌠well Iâm guessing you have one. But again, you have all of the useful information already.
Are you saying that not all OLD blocks from the excel file are present in the model? ie the excel file contains all possible block names?
If thatâs the case then your answer lies in the output of one of your GetBlockByName nodes. Youâll just need to Clean the list.