Adding shared Parametrs from text file to RFA

orchid
#21

still not change

0 Likes

#22

First, the problem you get is that you try to rerun an already open file… therefore don’t build your graph working on anything else that the current open family. When that works, then you can extend it to include files being open in the background.

As a newcomer, you need to learn and solve the basic things first before jumping into more complex solutions. It is much easier to solve the base case and then scale up along the way… not the other way around.

It would take me minutes to solve your problem, but you would not have learned anything from that, therefore you need to show what you are doing and then we will be able to help you along the way.

@Mark.Ackerley is an excellent Regular, please do as he says. Inform what is going on step by step with images and error messages. Therefore, always include the graph file, images of the graph, and whatever is needed to understand your situation.

0 Likes

#23

a node which does not have a “black” header is not working! what you miss is adding an input or check that a default value is set… it is the latter you miss.

AND stop testing on more than the base case so you know what is going on!

0 Likes

#26

Hey,

@erfajo, I’ve had a go, but I’m struggling to get the types working? I’ve tried running at L1 and L2 but it always seems to take the first type?

it’s quite knotty so I have sympathy with @s.rooble :slight_smile:

You’ve got to be careful with this, my default Shared Parameter File was set to my office one, that meant the family used those and they had the wrong types!

Also:

  • I had to upgrade the family to 2018 first because that’s what I’m using.

  • I dumped the txt into excel for convenience.

  • As Erik says, you need to just create a new family from template, it can be any, but it just gets Dynamo into working with Families, not Projects. Don’t open any family you want to edit.

@erfajo Thanks again for your package!


test2.xlsx (14.3 KB)
Add Share Parameter to RFA-MKA.dyn (62.1 KB)

Hope that helps,

Mark

Edit:
Here’s my playing to get the type working…

0 Likes

#27

Hi @Mark.Ackerley I really appreciate your support on this and thank you @erfajo for the advice I defiantly am running before I can work however I have used this sort of method in project parameters and not necessary family based which has turn out to be complicated.

For this workflow to work, I usually open Revit and open Dynamo and just work on it that way however for this to work do I need to work in Dynamo studio and then run the script because I had the family open live and trued running the graph which didn’t work.

0 Likes

#28

hi @Mark.Ackerley,

You always need to set the "current" shared parameter file, to be sure it uses the right one. However, you might have a point there, I could create a node there set the shared parameter file as well, and reset it back to whatever. I will look into that :slight_smile:

Therefore, DO NOT USE excel to get the parameter name, this is a bad idea.

One more thing is important, look at the input ports to see what it takes! Mine takes only one "type" at the time but gladly several parameters. I have to control every time that the proper "type" is set, but that can be added to several parameters! so hover the input ports and check what they take!
-There is several of the inputs there takes only one input and other there takes a list!

In the OOTB nodes is this not the case, but I do not understand how things like "type" can be controlled unless you send a full list of parameter, type for type so to speak.
-List level will only work if the input has the same length!

So the backside is clearly that you need to understand the nature of what the node takes for input, and that goes essentially for all nodes throughout dynamo.

0 Likes

#29

all you need to do in the first place is open a family, and get the “green” box working… then add the “red” boxex when it works… thats it :slight_smile:

And as @Mark.Ackerley points out… you need to set the “shared parameter file” INSIDE REVIT to be the COBie one… Do not use Excel …you can reset your SP file when you have done whatever you need to do with the COBie stuff.

0 Likes

#30

Yes agreed :smiley:

But if you have a few thousand families that you want to add a few thousand parameters too, you might want to speed that up a bit…

I’m getting the same results if I put everything in twice…

0 Likes

#31

then you do it like this…

one “green” box for each type, you can add all the parameters using this one type at the time… no problem :slight_smile:

0 Likes

#32

Unfortunately that’s not working for me…

Add Share Parameter to RFA-MKAByType.dyn (116.3 KB)


EDIT: Images don’t expand when clicked on, when did that happen?!

0 Likes

#34

please get rid of the excel part. You can set a SP file inside Revit, and reset it afterwards…

0 Likes

#35

Ok ok…

I get a different error now :slight_smile:

Add Share Parameter to RFA-NoExcel.dyn (100.3 KB)

image

0 Likes

#36

@Mark.Ackerley

I have created a beta build (BETA_6927) could you please test this version? Hopefully this has fixed your error…

I have also created a new node for setting the Shared Parameter file. The idea is to set the "new" SP file, then do your stuff, and in the end, return to the original SP file. If you want to test it without any "Stuff", then use the Circut node, set it to false and then you can verify that the SP file changes. then test it with the Circuit set to true and you should end up with the file you had in your file (must be reset between the two tests).

When you want it included in a graph, then use the Await node, waiting for the "Stuff" to complete before setting the original SP file back again.

SetSPfile.dyn (8.7 KB)

0 Likes

#37

It’s awesome that you’ve got back to me that quick :slight_smile:

I have updated and tried to utilise the new nodes, unfortunately I am now getting a slightly different error?

I tried using end-start transaction nodes but it didn’t help :frowning:

Add Share Parameter to RFA-NoExcel.dyn (109.5 KB)

0 Likes

#38

dont overthink things :slight_smile:
…yes this will fail… you should only set the file once!

In the Python script node you open the SP file, this might be a problem!

try this
Add Share Parameter to RFA-NoExcel.dyn (83.8 KB)

2 Likes

#39

Yes I had the same issue I had zoom into my screen to see the whole thing

0 Likes

#40

I had to use get item at index, as there are levels…

But still the same error… :frowning:

I tried dispose? Perhaps that’s wrong… it didn’t seem to help… :frowning:

image

Add Share Parameter to RFA-NoExcel-2.dyn (88.0 KB)

0 Likes

#41

ahh… yes of course… the group name is the wrong one every time!

new nodes need to be coded… I will look into this

1 Like

#42

here you are… another new node (Parameter.GetSharedParameter) …get the updated beta build, and please let me know if this works as expected now :slight_smile:

Add Share Parameter to RFA-NoExcel.dyn (48.1 KB)

0 Likes

#43

Woop Woop! Amazing work :slight_smile:

Thanks Erik, if we don’t speak before, have a great Christmas!

My slightly tweaked version…

Add Share Parameter to RFA-NoExcel (3).dyn (52.2 KB)

0 Likes

Batch Add shared Parameters into Families