Create Shared parameter from excel file

orchid
#3

Hello, thank you for your answer.

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)

#4

There is no script in this graph… everything is nodes connected by wires forming a graph.

As I mentioned, learn to use ListLevel
https://dynamobim.org/introducing-listlevel-working-with-lists-made-easier/
https://primer.dynamobim.org/en/06_Designing-with-Lists/6-3_lists-of-lists.html

#5

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.

#6

Even it is the old layout for my nodes, you need to do the same process…

#7

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
#8

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
#9

I strongly disagree. An important thing is to learn the right term from the start. At least it is so in the academic world.

Learning a language is something we are taught from childhood. We learn how to write the right words in sentences from childhood. We continue this education lifelong. At universities, we are eager to learn students the language of the industry they are entering. So that the community (the industry) they enter understand what is written and said.

Giving up language is giving up the core of whatever a culture stands for.

I don’t think it is a good idea to let fast business slang become the language in the construction industry. I will keep defending using the right term, the right language at any time.

#10

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”.

1 Like
#11

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
#12

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

You’re welcome!

Cheers!

#13

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.)

#15

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
#16

This is what happens if you establish your own language… I did mention that I was talking about a computer science notation.



.
.
.
Try also to open a dynamo 1.3 file in a text editor…

<Connectors>
  <Dynamo.Graph.Connectors.ConnectorModel ... />
</Connectors>

Or take a look at the Dynamo Primer…

from https://primer.dynamobim.org/13_Best-Practice/13-2_Graph-Strategies.html

Maintain Readability

In addition to making your graph as simple and efficient as possible, strive for graphic clarity. Despite your best efforts to make your graph intuitive with logical groupings, relationships might not be readily apparent. A simple Note inside of a Group or renaming a slider can save you or another user from unnecessary confusion or panning across the graph. The following are several ways that will help you apply graphic consistency within and across your graphs.

#17

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
#18

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

#19

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
#20

@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
#21

Everybody wins :smiley:

#22

Hi @larrel_jan

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

Cheers!

3 Likes
#23

It worked like a charm.

Thank you