Create Shared parameter from excel file

I’m trying to create shared parameters from a excel file.

I have a Huge list of IFC parameters that after some cleaning i would like to import into Revit shared parameters.

I tried the Orchid package and actually it works, but Its somehow limited. I can only assign one parameter type. That means If I have 10 parameters and half are “Yes / No” parameters and the other half are “Text parameters”, the Orchid node will only apply one Parameter (text for example).

I need to be capable to assign different types parameter to each parameter, so I tried the archilab node with seems that could do what I want, but It seems that I can’t make it work.

Anyone know what I am missing? Maybe the node its not intended to do what I want?

Hello, thank you for your answer.

Orchid

with the help of another post in here i made this, using the orchid script
My excel file basically has the name of the parameter and the type of parameter
I listed 13 parameted types to see if it works

When i ran the script, the names are correctly created and displayed but all my parameters are integer parameters (which is the first in my list). My guess is it only reads the first and apply it for all the items. and for what i understand, you can not use a list in that field, only one parameter.

Is there any way to achive what i need using your nodes?
Thank you

(English is not my first language)

By script I actually meant the graph (I’m not familiarized with proper dynamo language)

I don’t understand why you recommend to learn how to use ListLevel, I mean, the four list I have in my first png (first post) and the two I have in the second post using your node, shows exactly what I want to have.

Actually, I manage to create the shared parameters as intended (at least with your node) but I can’t figure out how to assign a different type parameter for each parameter.

The point is. I have 13 names in my excel each of one with a different type parameters and the idea is create all of them in one go at the same time.

Hi Larrel_Jan,
BTW, you should feel free to call it a script, graph, etc, you do you.Lots of people refer to these things by different names, we know what you mean, and we’re just happy to have you here to participate in the conversation.
-Z

5 Likes

Hi @larrel_jan

Have a look at this post:

You can find excel sample and dyn script to create shared parameters from excel in there.

Cheers!

2 Likes

I’m sure you do disagree Erik, it’s why we love you. Please DM me or start another topic on semantics, I’d be happy to talk about my “fast business slang” use of “script”.

2 Likes

Wow,
That did the trick flawless

I edited the graph and added a List.Transpose after the Excel.ReadFromFile because i prefer listing all my parameters in columns instead than in lines and worked just fine.

Thank you

1 Like

Glad it worked :slight_smile:. Please mark the post as solved.

You’re welcome!

Cheers!

Something i was taught from childhood was to be nice, even if people around me are using the wrong terms.

And cultures vastly transcend languages. I travel all over the world, and experience beautiful cultures, many of which i do not speak the dialect. And they are very GRACIOUS when i use the wrong terms. (I always learn to say i apologize first.)

2 Likes

And yet… If they are called Scripts, they still work just as effectively. :slight_smile:

For what its worth, the majority of our clients refer to them as scripts, and i usually do as well. Just the same as some folks call Revit Families “Components,” or “Objects,” or (even worse) “Parts,” which is confusing because Revit actually has a Part command, and also because Catia has Parts. All that to say, it really isnt a slant or a slight, to call them Graphs.

Interestingly enough, if you look up the Definition of a “Graph,” (a diagram showing the relation between variable quantities, typically of two variables) what Dynamo does doesnt fit that criteria either, unless the Preview is on and the particular script/graph is performing some task that displays results based on inputs. In that sense, all of the scripts/graphs that i make for data manipulation (which have no preview) technically arent “Graphs” either. I think im going to call them “thingies.”

Im proud to call them “thingies.”

All that to say, it doesnt matter. And whats interesting (just my point of view) is there are multiple threads where youve had that exact conversation with other members, and they have all responded “By script i meant the graph/dyn/whatever.” Sometimes popular opinion does form the perceived truth.

I was never a Britney Spears fan. But that doesnt mean she didnt make millions and top the charts. In a debate about “was she good,” there are a lot of ways i can lose that argument, based on public opinion. :slight_smile:

1 Like

Yep, I’ve see that. Ive also seen many many many online posts calling them Scripts. Neither one, does a fact make. I havent seen anyone calling them Thingies.

I hope they still work correctly when i call them Script Thingies.

1 Like

hello again

quick question.

At first I didn’t intent to use your graph to add project parameters but since its already capable of doing that, why not. Anyways i was trying to add some parameters and they are always added as instances even in i write false in the instance cell in excel.

I tried with: “FALSE” and “false” (and some other parameters) my guess is that i’m messing up with the caps somewhere.
I tried uploading my excel sheet and the forum wouldn’t allow me. its says i’m new and I’m not allowed. anyways, there’s a screenshot. The only parameter i changed in that test was the las cells from TRUE to FALSE and when importing is a success but the parameter is always an instance.

My Revit version is 2018 in case that matters and Dynamo 1.3.2.2480

capture

Thank you
Regards

Beg to differ, I get an error… :stuck_out_tongue: :smiley:

Edit: I just know JP is rewriting his class names as we speak!

using System;
using System.Collections.Generic;
using System.Reflection;
using Autodesk.DesignScript.Runtime;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Events;
using Autodesk.Revit.UI;
using Autodesk.Revit.UI.Events;
using Dynamo.Applications;
using Dynamo.Applications.ViewModel;
using Dynamo.whatsits;
using Dynamo.thingie;
using Dynamo.thingie.thingiemajigs;
using Dynamo.thingie.thingiemabobs;
using Dynamo.thingie.Scripts;
using Dynamo.Models;
using Dynamo.ViewModels;
using RevitServices.Persistence;
using Rhythm.Utilities;
using Object = DSCore.Object;

namespace Rhythm.Revit.Application
{
    /// <summary>
    /// Wrapper class for application level nodes.
    /// </summary>
    public class Applications
    {

Love you guys :smiley: :smiley:

1 Like

@Mark.Ackerley, I beg to differ
image

Funny thing is, all of those using statements are not even needed! :see_no_evil: Thanks for the reminder to clean them up too.

1 Like

Everybody wins :smiley:

Hi @larrel_jan

That’s because your reading Excel Values as “Strings” Change boolean to False. It should work for you:

Cheers!

3 Likes

It worked like a charm.

Thank you