Dynamo applied value but not export to Revit

Hi everyone, I successfully created the sheet then I tried to apply the value for the sheets’ parameters as shown below. In Dynamo it showed that parameters were assigned successfully. But in Revit there was no value shown.
Did I do wrong somewhere? Is that because the 2 blue parameters has text value input ?
Can anyone tell me how I can fix this please?

Update 1: So I do the other way around. This works! with the reverse effect. Dynamo reports Null value but the value is registered in Revit. I still want to know why the script is happening this way. Can anyone please help to explain? Thank you all !

@Qnguyen2688 in your first graph you are getting parameters value (empty parameter gets a null value) and not setting them.
Try Element.SetParameterByName node.

It looks like you may be creating the sheets before you apply parameter values. In some cases you have to force the transaction to end before you can modify the new elements. Try placing a Transaction.End node somewhere after element creation but before setting the values.

Hi Nick, thanks for replying, I did used end transaction, but the first graph still did not work.
The 2nd graph works like a charm now tho, but what is brothering me is that dynamo shows null value. I guess as long as Revit recognizes the value and registers the value, doesn’t matter what dynamo shows, is that true ?

Hi tradelie, thanks for replying. I used Element.SetParamByName node as marked below. I changed the name. The get parameter by name is just a verification step for me to know if dynamo actually sets the value. As result, dynamo did, but Revit did not. Mention below, the 2nd graph works like a charm, but it is bothering me that Dynamo value shows null.

Is there a reason you aren’t using the standard SetParameterByName node? I’m not familiar with the nodes you’re using.

hello are you sure its a string text parameter you write to

@Qnguyen2688 Ah you got me there, these are renamed nodes, can you try first to create the sheets using the Python node, then set the parameters by names, just to check if it is an issue of Wait For/ Passthrough as @Nick_Boyts suggesting?

Hi Sovitek, yes I am sure, I assume if the dynamo graph run without yellow errors, means dynamo executes the command successfully.

Tradelie, I did what Nick suggested. First graph, same things happened, Dynamo applied the value but Revit has no value.

2nd graph as you can see somehow revit duplicated parameter, each parameter has a set of 2. so i looked for all parameter with the same name and apply the value that i want to that parameters. IT WORKED in revit ! but now Dynamo show Null. Weird!

the set parameter node returns void, so it will always return null.

1 Like

Hi @Michael is there another node that I can use for Dynamo to return the value instead of void?

Set.parameter.byname won’t work in this case because there was duplicated parameter with the same name I assume. So dynamo may applied value to one but the other. Say if this is an on-going project, that I cannot remove the duplicate parameter because I am not sure if other users use the duplicated one.

Can you post the dyn and an example RVT?

Hi Nick sorry I cannot post the RVT file in public. Tho I can post Dynamo file. Tho without revit file, i think it doesnt make sense.

The workflow I am trying to introduce is.

  1. Create sheet from Excel/ end transaction
  2. Apply the value on the sheet then the sheet can be sorted/grouped automatically in revit. And they will show in correct graphic order

Why did I not use “element.setparameter.byname” ?

  • Yes I did in graph 1 (photo1) I renamed the node. Dynamo successfully applies the value to parameter in Dynamo but in Revit showed none.

Why did I use other node “Parameter.setvalue” (photo2) ?

  • The reason is because there are duplicated parameter with the same name in Revit, then Dynamo
    may apply the value to duplicated parameter instead. So I thought of searching for all parameters
    with the same name then apply the value to them all. IT WORKS!

So 2 questions:
1st. was answered by Michael - Why did graph 2 value return as null?

  • Michael said because output is void

2nd. Why was it exactly graph 1 did not work? Was it because the parameter has duplicate and dynamo can only apply the value to 1 parameter at a time whichever it found first?

Both graphs ran smooth without error. Just the outcomes were different. Thanks please lemme know if you still want to see the dynamo file without Revit sample

You should be able to strip your RVT file down to just the sheets that you’re trying to modify. That’s all we need to troubleshoot.

Hi @Nick, sorry for the late reply, took me a while to replicate the situation :smiley: Attached please have a look at the Revit sample/Dynamo script and the excel file. Thanks - Q
Sheets Dynamo forum.xlsx (13.8 KB)
SheetFromExcel-DYNAMO FORUM.dyn (119.2 KB)
DYNAMO FORUM TEST.rvt (416 KB)

@Qnguyen2688 There are a couple issues with your graph, all revolving around not handling your data properly. This is a common issue with these types of “import” scripts.

First of all, you filter SheetName and SheetNumber separately. You don’t have to do this since SheetNumber is already unique and can be used to filter all your existing data, but the larger concern is you sort this data before filtering it.
image
All of your data is already aligned in Excel. Sorting it in Dynamo (separately) just mixes everything up. You can see this in your existing sheets where the Sheet Names and Sheet Numbers don’t match what you have in Excel.

Similarly, when you go to write your parameter values to your new sheets, you take the original unfiltered list of values and assign it to the sheets the have since been re-sorted. None of your original data structure is intact at this point.

Clean this all up and you should have a working graph.

1 Like

Hi @Nick, thank you so much for your help, really appreciated your time looking into this.

Noted! Now I look at it, I agree that way too much unnecessary sorting and grouping steps. I am trimming the graph down.

The sheet Names and Numbers are not aligned because there is a random row with value “code academy” in the excel file, this messed up Dynamo data flow, I just removed It, list is in order now.

Option 1 still doesn’t work. Set.element.parameterbyname in Dynamo only sets value for 1 parameter which ever it found first. As shown in the photos, the 2nd parameter with the same name is blank. Since I should not delete the other parameter in Revit. I will move forward with Option 2.

Option 2 works like a charm, because Dynamo looked for ALL parameter with the searched name and applied the value to it. But returned value as null. Which is right, because the node output is voided. I think it is fine, this is the end of the graph and function, I do not need value of the parameters anyway.