Create family type and set parameter in fam document

Hi guys,

Im back again with some questions about working in a fam document from dynamo.

I want to create multiple familytypes (from a list) and set a parametervalue. The creating multiple types works perfectly, but the setting parameter values does not eventhough it says that it did.

Can someone help me ?



As u can see, the parameter value in Type 4 is 1. (the same as Type 1, the default value). It did not change the value to 3(my input in the script)

@verdi
I have recently made a script to do this using @erfajo’s Orchid Script.

The issue was that previously the Set.parameter node could not apply values to multiple parameters for multiple family types. He has now corrected this with his latest update (version needs to end in 98 or higher)

Below is my basic script using an excel spreadsheet as the data source (also including an error checking subscript). Please take note of the order that the parameter values need to be. They must be listed by Family Type, not by Parameter.

1 Like

If I look at your inputs and I look at mine, I do not see the mistake(or difference) in mine yet. Do you ? So I do not understand why it isnt working.

Not sure. But I can’t see all your inputs, it’s a little unclear.

However, you have repeated the parameter name “test” which is unnecessary. Just the unique parameter names are needed I think

Have you used the latest orchid package? Please post an image of your Package Manager

If you download the image, you can see all my inputs more clearly. You can also see the existing parameters in the family document.

image

I have also tried with 1 parameter and 1 input. Same result, without giving a warning or message that it didnt work.

Ok so firstly the latest version of Orchid Package for Dynamo 2.0 is 200.3.0.6802

Currently the suggested way to update is to uninstall the package in dynamo. (Make sure the package folder in windows no longer shows a folder for Orchid, then re-download in package search, and then run the .exe file from the page above.

Secondly, there is no need to repeat the parameter names for each Family Type. See my script, I have:

Parameter 1 = Model
Parameter 2 = Manufacturer

these are fed as a list of just these 2 strings to the parameter name input.

Hope it works :slight_smile:

1 Like

Just to clarify how I use numbers…

Number syntax: Major.Minor.Build.Revision (x.x.x.x).

The major number follows the Dynamo version, 200.x.x is usable in Dynamo +2.0.0.x versions. The minor number is internal major builds. The build number is internal minor builds. The revision number is an internal build number without public documentation and display.

This means that x.x.x.6796 and x.x.x.6802 can do the same in their functions

However, as @danielU3R39 writes… I updated the installer so it works just like the new "LunchBox" installer. This is not very clear, since that came as an “internal build”. It means that you very well can have both and old version and a new version running in parallel. Follow @danielU3R39 advice and manually delete the old Orchid folder and reinstall using the executable installer

Good thing is that both the 130 branch and the 200 branch is being installed according to the dynamo versions installed (including the beta 2.1.0) AND it is installed in the “Sandbox” version as well in the proper folders. it installs all in all two versions per branch without the user has to do anything :slight_smile:

https://raw.githubusercontent.com/erfajo/OrchidForDynamo/master/OrchidForDynamo.exe

sorry for your inconvenience :slight_smile:

@verdi
please attach the graph file (.dyn) and preferable also a full image of your graph, then I will try to take a look at it :slight_smile:

Ive updated the package but its still not working. I hope you can help.

image

Family1.rfa (340 KB)

FamTypesTest.dyn (35.7 KB)

@verdi,

You had several errors, all of them come from feeding nodes with wrong types. please read which data type a node takes as input. if a node wants strings, don’t feed it with FamilyType and if you have a parameter type in doubles don’t feed it with int. use the “Object.Type” to test what you are feeding nodes with if you don’t know it.


FamTypesTest.dyn (37.2 KB)

I think your real problem is that you want to edit parameter values for your newly created types, but since you didn’t know which FamilyType you used, then you ended editing the wrong one. I think your graph could be much simpler and more secure…


FamTypesTest.dyn (27.3 KB)

1 Like

Thank you. I will take ur advice and make it simpeler as yours.

I checked the input types of the old script and the only difference i found (using the object.type node) is that the “number” node creates an int. and not a double.

I will use the num +0.0 node to create thedoubles. Thank you for your help.

what you are doing is turning apples into apple juice… but we want tomatoes.

Output of FamilyType.ALL is FamilyTypes, you turn them into strings… but it is the Familytype.Name (which is string type) there is needed.

If you hover the input port, then this “help” text should help you to feed the proper data type
image

1 Like

Your input “help” in the nodes is clear. It was my mistake. Ive recreated the script as you advised. It works perfectly now. Thank you very much!

I thought my first mistake was that the node did not read the family type name so i switched it to the family type as string. Later you showed me the fault was in the int/double, but I did not put the fam type node back.

Do you know if it is possible to set a Material parameter this way ? I have tried to insert a “material” with id and a string of the material name, but without any luck.

image

I have not been able to find the right input yet when setting a material parameter using Dynamo.