Create Project Parameter from Shared Parameter


#8

This is the version I am on currently.

FYI: I needed a Project Parameter that comes from the Shared Parameter file, as I need to be able to Schedule as well as Tag the element. As I understand it this is the only Parameter Type that can be Scheduled as well as be able to be used in a Tag. Isn’t this correct?


#9

source: http://paulaubin.com/blog/revit-parameters/


#10

@mdhutchinson

You are both right and wrong… and this goes for @Marcel_Rijsmus as well

You are thinking about what you can do inside Revit. In that case, @Marcel_Rijsmus is right. However, this is not how we can do it inside Dynamo. In dynamo we have to use “ExternalDefinition” from the API, this means essentially that we always are creating “Shared Parameters”, there is no other way.

Therefore does both the code in the OOTB node and the code in my nodes essentially do the same. We create a project parameter by using a “dummy” shared parameter file there is deleted afterwards. This is why adding a “groupName” has no meaning at all, since the newly created “shared parameter” file is being deleted.

@mdhutchinson you are writing in the title that you want to create a project parameter by using a parameter you have created in your shared parameter file. Therefore, it is “Create Shared Parameter” you need to use. That is why “groupName” exist since you in your shared parameter file have created the parameter in some kind of group!

I can see that you have 2.02 installed. Did you also have this with the first image you uploaded? in that case it is an issue for @Michael_Kirschner2 but it might be an issue you should file at the DynamoDS Github page.

the below part of the code for the OOTB nodes describes the problem…

// buffer the current shared parameter file name and apply a new empty parameter file instead
string sharedParameterFile = document.Application.SharedParametersFilename;
string tempSharedParameterFile = System.IO.Path.GetTempFileName() + ".txt";
using (System.IO.File.Create(tempSharedParameterFile)) { }
document.Application.SharedParametersFilename = tempSharedParameterFile;

#11

In our company we share the shared parameters (protocol) as a file with our project partners such as construction and the MEP guys aswell. Consistancy is key in some projects.
This allows us to create filters that work for all, and in all models, for instance.
It’s part of our collaboration strategy and it is working very well.

In addition:
If you could make me a node that would give me the value of a parameter by parameterGUID it would make me very happy.


#12

I have this workflow under test right now… in all two new nodes is in the beta build

@Marcel_Rijsmus it will be rather easy to add what you wish… let me look into it tomorrow :slight_smile:


#13

@Marcel_Rijsmus

check this…


#14

Maybe i didn’t explain very well.
We have cases where we end up with double, triple or many Shared Project parameters with the same name.
Only one of those is the original shared parameter from the shared parameter file with its GUID.
Imagine we have a Dynamo workflow where we use SetParameterByName and i use that name of the multiple parameter.
Where does the data go?
You see?

People tend to copy from linked files bringing in the parameters aswell, and people tend to create parameters that are already in the project evironment when creating families (you can only know when you were aware of that). We have Reviteers with little experience and full blown masters.

another scenario:
Lets say we have a shared project parameter set to some category as a type parameter. Now make a family with that same shared parameter set as instance and load the family in the project.

next scenario:
Lets say we recreate the parameters with that same name as family parameter (so not the shared one) when editing a family and load it.
What happens?
Maybe i missed it in your nodes but can you make something that solves this?


#15

…meaning essentially, GUID from the parameters inside the project, and then you can compare those with the guids in the “master” file… which could be one of the two new query node I have build :slight_smile:

So the node missing is getting the project parameters guids!?

The remaning is filtering (OOTB node) and deleting (one of my parameter nodes) what should not be present in the project.


#16

Yeah, sort of…
A workflow where i can round up all data values set to the faulty parameters and set it to the correct one, concat if nessesary (there might be two), then delete the parameters.

I can understand that you cannot program around stupidity :slight_smile:


#17

I will try to see what can be done… however Christmas/New Year is rising, so I am afraid it will be on the other side of all that.

I have filed it on my wish list


#18

So, where does this leave me?

as # erfajo pointed out, this can be done manually from inside of Revit by the user. And, I’ll admit, it is easy to do. I was hoping to automate as much as possible for this overall Dynamo solution - to gain buy-in from the users.

So, I am needing parameters associated to the Room objects… the only way I know of doing this is through a Project Parameter… and since you cannot use it in both schedules and a tag, this is the reason it needs to be a Shared Parameter.

See image below:


#19

In the project parameters dialog you can choose a shared parameter when you click add, is this what you mean?


#20

Sorry, that last post wasn’t clear enough. However, this is why I titled original post. “Create Project Parameter from a Shared Parameter”… the answer to your question is definitely yes.

I need Parameter that can be both Scheduled as well as shown in a tag.

I am green with revit, I’ll admit. Isn’t this the only way to get that?


#21

it is.
in a tag family you can add the same shared parameter inside a label, but make sure you have a shared parameter file
and as soon as the shared parameter is added to your project parameters
you can schedule aswell
the same values will be shown in schedule and tag alike


#22

Exactly!

Where did I miss communicate?

Why are others on this thread seem to be pointing me in another direction?

It is exactly this process that I want to automate with Dynamo.


#23

@mdhutchinson,

Nobody else than you is talking about project parameter… everyone else is talking about you should add shared parameters. It might be your knowledge about which kind of parameter is what (this is what @Marcel_Rijsmus tried to explain). However this is not the entire truth, since it is a fact that Dynamo doesnt really handle Project parameters as Revit does!

Solution is… add Shared Parameters from your shared parameter file.


#24

I already have the Shared Parameters I need in the file.
So are you saying that there is currently no way to automate adding the Project Parameters I need using Dynamo?


#25

YES! This is what I mean.


#26

I did some searches here on the forum.
I dont know what version of Dynamo/Revit you are working on, but i can see talk about an OOTB node that does this., haven’t tested it myself, and i see a lot of post that speak of one parameter at the time, but still.
It all seems to come down at setting the shared parameter in your project first, no option to browse to the file, but i might be wrong.
It seems to me that @erfajo has a lot of experience with this, maybe he can provide a workflow/dyn
This might be a good start


#27

@Marcel_Rijsmus, thanks for the hint :slight_smile:
a mapping table for IFC is surely something i have to look into :slight_smile:

@mdhutchinson, please… you are on a wrong track, we are all trying to help you, so please test our suggestions.