Cycle through all linked documents to create a list - Replacing null values only

dynamo
geometry
springnodes
python
archi-lab
#1

This is awesome! thanks

After I got this to work I realized that my model has many (10) linked models associated, So I am trying to figure out a way to iterate the above code (to find the linked doors) over each linked model doc. I want to create one list with the linked doors. So iterating this code over each link and writing all the outcomes to the same list which should be the same length as the door tags list. Keeping the elements and rewriting the new elements to the null values - keeping the previous ones.

Right now I am able to get one list per linked model through the use of List.Map but this node does not append to the same list rather it creates a new list.

Image 2 shows my custom node: Doc Repeater


Any ideas?

Get Tag Host Element from element in a Linked Model
#2

This topic is already solved so am splitting this out into a new one.

2 Likes
#3

Hi @Ben.AR,

Is that what you are looking for ?


#4

I am not sure,

What does the List.Clean node do? Also the node I have for “Tag not Tagged” does not allow me to give it a list of documents.

Thanks

#5

Hi,

The Get Tagged Element node now takes a list of documents as input.

P.S : You have to update the package.

1 Like
#6

This looks really cool. However every time I try to install the Genius Loci package my Revit Crashes.

Is this an issue with the package or my Revit? (using Dynamo 2.01.5055)

I got it to work Thanks,

#7

Glad I could help out. :grinning:

Another user warned me about this problem with the package manager in Dynamo 2.0.
So I made some investigations on differents computers with exactly same packages installed, same Revit build and same Dynamo build.
I found one computer where the error occurs when 2 essential packages are already installed.
If I remove these packages, there is no more crash.

Note that installing the package in Dynamo 2.0 crashes Revit but the package is still installed.

On other computers there is no problem when installing the Genius Loci package, so it’s therefore very difficult to solve the issue.
To avoid crashing Revit, a workaround is to download the package from the website https://dynamopackages.com/ and place the contents of the .zip in the folder : C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.0\packages\Genius Loci

I also experienced crashes when installing other packages with Dynamo 2.0 and so the problem does not seem to be limited to this particular package.

Maybe @JacobSmall will have a clue.

2 Likes
Batch plot to pdf
#8

Yes I was able to find a workaround similar to the above, opened it on a remote desktop and it worked

However I still have an issue with the output data from the node. I need to ensure the same index for both the door and the tag.

Meaning for item #17 in the Tag list should relate to item #17 in the door list. Right now it is not the case. There are cases where the linked document does not have the door so it goes to the next tag - thereby ruining the indexing.

Any ideas? My final out come i need is to get the TagText which contains the door number?

Is there a way to alter the current node, or make a new one, that can get the TagText from a IndependentTag hosted to a door in a linked model?

Thanks again

#9

Bit off topic, but:

That may be an old issue with any situation where active contents are modified forcing a refresh of content already in the active graph, at such a rate where bad things happen and the computer ca t keep up. I rarely update packages via the manager without first saving everything, a behavior dating back to when I was using Dynamo 0.6.2. Better results now, but perhaps not completely resolved.

@Alban_de_Chasteigner do you know of this occurred in a blank graph (nothing placed in the Dynamo workspace), with a clean install of the package, and Dynamo in manual execution mode?

1 Like
#10

Back to the topic:

@Alban_de_Chasteigner do you know how to adapt your node to get the tagText from the a tag in a local model hosted to a door in a linked model?

I have a feeling its pretty simple change to the code by adding tag.TagText just not sure where to put it.

Thanks,

#11

Hi,

It doesn’t seem to be possible in the API :
Autodesk.Revit.Exceptions.InvalidOperationException : The tagging element is in the link.

https://apidocs.co/apps/revit/2019/8e297dee-920d-f620-6198-0bed494e3f04.htm

#12

Hi @JacobSmall,

Thanks for your reply.
I always install packages without an open graph. (the same crash occurs with a blank graph in manual execution mode).
The amazing thing for me is why on some computers, the package installs normally and not on others.

#13

Interesting thanks for your reply.

I thought it was possible because @Konrad_K_Sobon mentions it here: Host of Tag

Any other idea on how I can maintain the indexing of the tags to the element?

I can share my current graph if you would like.

#14

The TagText property works with tags on linked rooms but not with independent tags on linked elements based on my tests.

Yes, share your graph because I don’t visualize your issue with indexes.

#15

See the attached document for my dynamo graph. I added notes to the area where I need to fix the indexing.

The overall goal of this script is to find all the Door Tags and schedule information that is contained in both the door(only the mark value) and the tag. I get it all to work except the wrong information is being combined.

Thanks for your help,
Place Family on Door - Python code from GeniusL.dyn (231.9 KB)

#16

I understood your problem.

You must use the @ L1 list level to maintain the correct order of the doors.

#17

Thanks for the update - but still having many issues with opening the Genius Loci Package.

I have attached below the most recent error log, the last few lines seem to show that there is an issue with the itextsharp.dll file.

Any thoughts @JacobSmall or @Alban_de_Chasteigner

dynamoLog_ac96d645-e668-45f1-a2c0-f492d3889072.txt (4.5 KB)

#18

Actual error is inside that module.

Can’t import System.Collections.Generic.Dictionary2+ValueCollection. ValueCollection is already imported as System.Collections.Generic.Dictionary2+KeyCollection, namespace support needed.

My guess is a clashing package. Can you provide a list of all packages you have on the system?

#19

Hi Benjamin,

The last version of the Tag Get tagged Element node should be fine.
The order of the tags now matches the order of elements in the different links.

I did other tests with the package manager and the crash comes from zero touch node (.dll) so I removed it for the moment.

#20

Hi,
Thank you for the update. I was able to isolate the error I was having - it was a clash of packages as @JacobSmall mentioned. Lunchbox and GeniusLoci were not getting along, So I removed lunchbox and we are all set to go.

I still have some bugs to work out in my graph but I’ll figure those out.

Thank you both for your help. These forums are amazing!

1 Like