I need access to linked files rooms but nodes return "null"

archi-lab

#1

The attached image shows that the node for getting categories from a linked file is returning a “null” result. Is this happening for anyone else? I’ve also attached my sandbox files. I’ve a hospital that has 2000 rooms and I want to access the architects rooms but cannot! Any ideas as to what can be going wrong? Thanks Neil

 

Maste Rooms Select RoomsLinks not working


I need access to linked files rooms but nodes return “null”
#2

Get Documents node can possibly return a List of documents if you have more than one linked revit model. Use GetItemAtIndex node to retrieve only a single item as that is the input that GetAllElements from Linked Model node is expecting. Let me know if that works. Good luck!


#3

Thanks Konrad, I should have mentioned that the Get Document nodes have also being returning “null” when there definitely was linked files in the project. I’m a bit at a loss as to what is happening. Again, thanks anyway.


#4

 

Okay, I’m thinking it might be related to python not running correctly. When a python node is added to the graph, is it suppose to turn yellow like on the attached image? This is a fresh script with a unedited python node and it turns yellow straight out of the box. Am I wrong in thinking something is up? Dynamo 8.2

pythone


#5

Hi Conrad,

I am having the same issue as Neil where the “Get Documents” component has stopped working in Dynamo 8.2 and returns everything “null”. We are looking to do studies with a large model and multiple links so it would be ideal for production workflow to have this working. I’m not sure of any other component that can retrieve 20151102_Capture-room issuethe “LinkDoc” even though you can see the Document.LinksAndImports is still working to gathering ImporteInstance Elements. I’m not sure if these elements can be translated into the right information for the LinkDoc input…

Let me know! By the way your efforts to develop and fill in the gaps for Dynamo have been amazing. Keep up the good work!
-Tim


#6

I am not sure what the problem can be and what is causing it specifically on your machines but it works just fine on my machine at home and at work. Here’s a screen grab:

Capture

Can you give me more information about your specific Revit version, dynamo version. Check your installs. I can’t help if you give me a truncated image of an error and no error images at all…
Can you make sure you have the latest package installed? Thanks!


#7

Hello Conrad. Thanks for getting back to me on this. I checked to have the latest version of Clockwork installed on my system for Dynamo version 8.2. You can see what version I’m running in the screenshot below. I think the issue is an outdated version of IronPython. As you can see from the image, I’m running version 2.7 and my project is in Revit 2015. What version would you recommend? Also, will Dynamo automatically recognize the updated Python on my system upon install or is there 1 more step to get the install running with Dynamo? I appreciate the help!

 

20151103-Dynamo Python 2

 

 

 


#8

Hi

I got the same issue today within a predefined script. After having replaced the node with a new one from the library it suddenly was working. I have used the script/node a lot but never seen this behavior before.

Used Dynamo 8.2 on top of Revit 2015

This solves nothing but I forth you should know.

Best regards

Jesper


#9

So I’ve tested this. Step 1, I created 2 local project files and linked #1 across to #2. Results of Get Document work. Step 2, I created both to be Central models with links maintained the same. Same result = WORKING. Finally, I tested back to the original project located on our server network with central models = FAIL. I think the python code is unable to communicate into where our central models are stored. Could this be solved by somehow querying the server drives I already have mapped to my local computer? And then using that to re-establish the link reference? I’ve talked to a colleague of mine who also noticed this issue about a week ago and was puzzled. Especially for big projects, there’s no other option but to link multiple models together.


#10

Tim,

Yes, so I guess the issue is that the LocalPath value that it’s trying to output is causing an error and that throws off the whole node. I can separate that particular operation from the rest of it, and it should work just fine.

I will post a new node when I have a min. Thanks for researching this for me.


#11

try the code above for the “Get Documents” node. I will also post it to my package when I am releasing the next update.


#12
 # Copyright(c) 2015, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net

# Huge thanks to Andreas Dieckmann for 
# adding link path functionality

# Import DocumentManager and TransactionManager
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)

#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN

linkInstances = FilteredElementCollector(doc).OfClass(RevitLinkInstance)

try:
	errorReport = None
	linkDoc, linkName, linkPath = [], [], []
	for i in linkInstances:
		linkDoc.append(i.GetLinkDocument())
		linkName.append(i.Name)
		try:
			linkPath.append(i.GetLinkDocument().PathName)
		except:
			pass
except:
	# if error accurs anywhere in the process catch it
	import traceback
	errorReport = traceback.format_exc()

#Assign your output to the OUT variable
if errorReport == None:
	OUT = linkDoc, linkName, linkInstances, linkPath
else:
	OUT = errorReport

#13

Thanks for the update Konrad, I just ran into the same issues these days. Unfortunately pulling the object data later on doesn’t work when using the “GetFromLinkedFile” by Julien Benoit, I can’t get the room’s geometry. Any idea on that topic?


#14

There is a node that should do the same thing in my package as well. It should work. Let me know if it doesn’t.


#15

Hey Konrad! So I have tested out the new code and it appears to be working perfectly! The only thing I am struggling with now is Dynamo list management, something I haven’t fully gotten my head around since I’m very comfortable coming from another program who’s name shall not be mentioned. That ‘other program’ at least makes the clear distinction between list and branch allowing for grouping and isolation. In my example posted below, how can I choose to retrieve all the links and apply the same room gather simultaneously? This discussion probably warrants another thread but list management beyond 2 levels in Dynamo is still a mystery to me.

Thanks again for the feedback Konrad and keep up the amazing work! You are making a big impact with your tool set. Cheers!

[caption id=“attachment_32804” align=“alignleft” width=“501”]

The overall links properly getting brought into the model.[/caption]


Get rooms in linked file
#16

+Konrad

Hey! So I got all the way to the end of my definition and was aiming to write out new parameters values to the elements I queried from the Linked Revit models. It gave me errors and wouldn’t allow it to process. > Download DYN File Here <

This is the working file but the aim is to write out the new parameter so we can appropriately filter our schedule. The bigger issue is targeting family parameters across linked instances. Any ideas?


#17

I have done some very similar things and posted at http://whatrevitwants.blogspot.com.au/2015/06/collect-elements-in-rooms-across-linked.html


#18

Can anyone confirm that the “Get Document” node works for Revit 2016? I have been able to use this with no issues on Revit 2015 projects but the node returns “null” values for a certain Revit 2016 project. I have had success reading link information on a small Revit 2016 project (on Revit Server) but this problem file for some reason only returns “null” for all outputs. Is there a known limit to # of links? Other known issues?

I am currently using archi-lab.net package 2015.12.10 with IronPython 2.7.3.

Thanks for any information you can provide.