Exhaustive listing of BuiltinParameter in a BuiltinParameterGroup

Exhaustive listing of BuiltinParameter in a BuiltinParameterGroup

Anonymous
Not applicable
1,118 Views
7 Replies
Message 1 of 8

Exhaustive listing of BuiltinParameter in a BuiltinParameterGroup

Anonymous
Not applicable

HI,

 

Is there a way to get all the possible BuiltInParameter inside a BuiltinParameterGroup?
I found this post : http://spiderinnet.typepad.com/blog/2011/04/parameter-of-revit-api-6-builtinparametergroup.html but the given algorithm depends on the current model. So it's not efficient and I would be missing data.

Regards,

DA ROCHA Romain

0 Likes
1,119 Views
7 Replies
Replies (7)
Message 2 of 8

JimJia
Alumni
Alumni

Dear DA ROCHA Romain,

 

I am sorry to say that there is currently no API access to this functionality. 

Because "Parameter groups are used to sort parameters within the Element Properties dialog."

 

It is element level information.

Its value depends on element, different element will return different values.


Jim Jia
Autodesk Forge Evangelist
https://forge.autodesk.com
Developer Technical Services
Autodesk Developer Network
Email: Jim.Jia@autodesk.com
0 Likes
Message 3 of 8

aignatovich
Advisor
Advisor

Hi!

 

Dear JimJia, does it really mean, that some specific builtinparameter could be in one builtinparameter in the first element and in the other in second? It is interesting

0 Likes
Message 4 of 8

Anonymous
Not applicable

That behavior would be a little bit weird

0 Likes
Message 5 of 8

jeremytammik
Autodesk
Autodesk

Please also take note of this brief exchange on the Revit roadmap:

 

https://forums.autodesk.com/t5/revit-roadmaps/revit-roadmap-update-april-2017/ba-p/7013972

 

@Anonymous Posted ‎2017-04-20:

 

I'll Believe it when I see it. Which I am assuming will be years from now as usual.

Here's an idea in the off chance you are actually working on improving the program:

The shared parameter interface and usability needs to be completely revamped perhaps a whole different interface or even separate linked database program that can properly manage large numbers of Shared parameters (and don't give the bogus excuse that their are third party programs that fill this need. Most of the third party programs out there are at best useless and at worst broken)

 

@sasha.crotty Posted ‎2017-04-23:

@mtwilliams416, I agree that shared parameters could use work. Hopefully we can add them to our roadmap going forward. In the meantime, I recommend voting on this and this idea.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 6 of 8

jeremytammik
Autodesk
Autodesk
0 Likes
Message 7 of 8

FAIR59
Advisor
Advisor

You can use a filtered elementcollector to get all the BuiltinParameters in a document.

 

			StringBuilder sb = new StringBuilder();
			Document document = this.ActiveUIDocument.Document;
			IEnumerable<ParameterElement> builtinParams = new FilteredElementCollector(document)
				.OfClass(typeof(ParameterElement))
				.Cast<ParameterElement>()
				.Where( p =>  !(p is SharedParameterElement));
			foreach(ParameterElement pElem in builtinParams)
			{
				sb.AppendLine(string.Format("{0} {1}", pElem.GetDefinition().ParameterGroup,pElem.GetDefinition().Name));
			}
			TaskDialog.Show("debug",sb.ToString());
0 Likes
Message 8 of 8

FAIR59
Advisor
Advisor

disregard my answer. I wasn't thinking straight. the test in the Where clause is totally wrong. 

0 Likes