Need to get Instance Parameters without the actual Instances

revit
dynamo
familyinstance

#1

I walked into a Revit setup involving hundreds of specified, created families with a large number of parameters on a template file. I am trying to use one of those parameters to compare with an Excel sheet and load the instances based on which values match the Excel sheet. The problem is that when I have tried to get the values of this particular parameter from all the families loaded into the template file, I have noticed many of them return no values. However, in Revit, the value shows clearly when the elements are placed.

I found out many of these families and types were created with the specified parameter (which should be a type parameter since it is never supposed to change) being a “default” instance parameter. I cannot go and tell the creators that they messed up on this, based on my status in this company, but is there a way to get instance parameters WITHOUT placing them first? The default values are all there, but I cannot access them from Dynamo with what I know. I know I can create an instance of all the (Special Equipment) types in the template, then go back and delete them, but that seems to be a BIG hassle, so I wanted to look for an alternative.


#2

There are ~550 family types, and I fear placing them all at once to have them compared to an excel list in cross-product lacing could crash revit (or my computer). Also, some of the types would need to be duplicated, which might further mess things up. I’ve tried all the “GetParameterValue” nodes I had with both elements (from family symbol types) and family types (from All family Types of Category from Clockwork):


#3

I would automate placing all the instances on a reference workset and then do your checking/setting. Since you’re placing by excel name, setting by excel values, there should be no cross product - it’d be shortest. Bullet dodged there. :smile:

You can then manually clean them after review. This won’t change the default value though. For that you would have to work in the family environment. Save out as library could help towards that end.


#4

Could it be that different parameters have been created in the family environment, with the same name, but not the same GUID? Where a Shared Parameter is used it would have the same GUID.


#5

I opted for another route: Instead of comparing the excel sheet with the parameters of the Revit template families, I decided to compare it with another sheet, which is “supposed to” have the most-up-to-date set of family info for the Revit template. The initial issue is that these files are provided to me in AutoCAD, and the AutoCAD file has the same parameters for equipment with different values… As I crawled deeper into the hole, however, I found the other sheet has its own issues, but is more consistent with the Revit file. Now, I can compare values using type parameters (which still aren’t entirely consistent), but for duplicate equipment, I cannot seem to add the list values after comparing them. The list on the bottom has the values for making the equipment; the list on the top has the number of items to be placed, with some of them duplicated. How do I add duplicate rows to the bottom list when I’m using cross-lacing comparison? I tried the if node, but I cannot get the condition part correct:


#6

I told one of the creators about this, and they just put their hands over their face. I tried placing my trust in the master sheet they have, since I know they keep that up-to-date, but the ONE value I need is incorrect in several places on this sheet (I also told them about this, but they only fix it on a case-by-case basis, and there’s only one person who fixes it). Now I will have to use your method, so I’ll populate a dummy file and update it myself. I’ll mark @Marcel_Rijsmus’s post as the solution if this works.


#7

It actually got two levels more complicated. Although I should’ve noticed sooner, they apparently set up most of the families where the parameter I’m looking for is (often) a part of the family type name. Instead of opting for a single solution, since the most semi-consistent parameter is listed in a bunch of locations, and unavailable in others because they are families only, I decided to compare the original excel sheet to the Master file 1st. The matches go in for comparison using the family type names, and if the names don’t work, another parameter combined with the family name on the file being worked on. If the master file values don’t match at all, I send a message to the user to check and manually add the instances.

For elements which do not match the master file, I send them to the repository file, holding all the families created, and compare them with the values listed there. The same as the other, it spits out values and names of the equipment from the excel sheet which did not match anything in the repository.

Thus far, it allows me to successfully add all the equipment I need, and for those not available, it gives a list for equipment to either be created or update in the template. The base problem still lies in the fact that these families were both created and placed into previous projects in different, inconsistent ways, and in my attempt to streamline the process, I ran into this. It takes about 5-15 minutes to fully run, but that saves time, compared to the manual process.
Thanks for all your help.