Orchid package possibilities

Hi All,

I want to know is Orchid package able to do following:

  1. Collect all families inside document, delete all lines inside families and of course update all the families?
  2. Collect all families inside document, rename all family parameters inside families (without knowing all the names of parameters), and of course update all the families?

Best regards, Branimir

@erfajo, this looks like it is for you.

I am not very familiear with everything Orchid contains, but I do know that you can certain open families, delete lines and then save as I have written a graph to purge unused elements from detail families and load them back in. This can be a great time saver, but can also be disastrous if not done right.

1 Like

I looked at your sample collection but couldn’t find the answer…That is one of the reasons I posted that on this forum :slight_smile:

I saw in your examples that you have Element-Category.dyn where I can select all the lines inside the family and eventually delete them, but I don’t know how to load back into current project because selection nodes don’t have output “document”.

Hi,

I am not sure if I understood you correctly…I tried to recreate your advice but couldn’t find the solution… Please see attachment:


Test.dyn (10.4 KB)

Best regards, Branimir

Tnx for this. Now it seems logical, but unfortunatelly I have another problem with this script…When I try to delete lines from family I get following error:

Test.dyn (11.5 KB)

Best regards, Branimir

OK, great.

Just as info to you, this was my only opened file…If that helps you with anything…

Best regards, Branimir

@brane1012 I don’t think the element.Delete will work like this. You have to modify the node / python to be deleting things from the Family Doc. This node as is defaults to the main Doc and won’t work.

You can see this example I have shared on here before:

And how can I recreate this? I must admit that I am not familiar with Python…

Can this node be downloaded from somewhere?

With a little bit of searching, it appears that the Genius Loci Package has a Delete Element from Document Node. I would start with that package if Python isn’t the best route for you.

View here for reference:

2 Likes

On first it seems that it works. I will do some more testing :slight_smile:

Thank you very much.

Best regards, Branimir

I am now thinking about my second question, but I believe this is not possible without actually knowing the name of parameters that I want to rename:

2. Collect all families inside document, rename all family parameters inside families (without knowing all the names of parameters), and of course update all the families?

Do you have any thoughts about this?

Best regards, Branimir

In what way do you want them renamed? If you need specific ones renamed to some else specific you will need to have all that info. If you just want them named like “param 1” to “param 12” or something yes you can do that. I would need to get in front of a computer, but I believe bi have code to do that.

Exactly what you said…I would like that all parameters are named from Parameter 1…Parameter XXX.

I would greatly appreciate if you can give me some guidance.

Best regards, Branimir

Hi,

I did some testing and it seems that node works, but only when you have one family type loaded into project. When I have several types loaded into project node deletes only the first type. Is that normal?

Best regards, Branimir

Hi,

I posted two files.

  1. Problem.png - is what I am actually trying to achieve. Delete all the lines from several families and family types. In the test file I used two families with two family types per each family.
  2. Capture.png is the graph after I run it.

Although element.delete node returns both null value, first value functions OK. It deletes the all the lines inside the family. The problem is that the graph doesn’t do that on the second one.


Best regards, Branimir

Hi,

here is the dyn file, and test families.

Best regards, Branimir

Air Terminal_1.rfa (340 KB)
Air Terminal_1.txt (1.5 KB)
Air Terminal_2.rfa (340 KB)
Air Terminal_2.txt (1.5 KB)
Family Lines_Test.dyn (12.0 KB)

@erfajo It seems that it works now. Thank you very much.

@SeanP Did you maybe have time to take a look how to rename parameters?

Best regards, Branimir

Yes, I know, but I don’t know how can I with your nodes rename family parameters if I don’t know their name. For example, I would like that:

XXXXX = Parameter 1
YYYYY = Parameter 2
ZZZZZ = Parameter 3.

where I don’t know XXXX, YYYY, ZZZZ. I just want that node recognizes all family parameters and change their name into Parameter 1…X

Best regards, Branimir

Yes, I know how would I do that…I am not just sure if Dynamo has such capabilities…

I would use:

  • your nodes for collecting of all families inside the project
  • collect all family parameters inside file (node that I dont know if exists)
  • rename them with following name Parameter 1…X (node that I dont know if exists)
  • your nodes for reloading families inside the project.

Best regards, Branimir

It looks like you may be able to do this (mostly) with a few nodes:

It appears that @erfajo does have a node for renaming parameters here:

You should be able to use this python to “get” all of the parameter names in the family document for the Orchid node:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = UnwrapElement(IN[0])
elementlist = list()
if doc.IsFamilyDocument:
	for param in doc.FamilyManager.Parameters:
		elementlist.append(param.Definition.Name)
OUT = elementlist

Keep in mind that if there are shared parameters it will probably not work and/or be MUCH more complicated.