I would need to export to excel like capture below.
Thanks you
Not sure if there is a node for it, but take a look at the Python in this link for param.Definition.ParameterGroup
thanks of your advise.
Actually, element parameters is not even added in revit yet and i am about to add element parameter by using the shared parameter text file (*.txt). But there is no information available which parameters is under which parameter group in that shared parameter text file.
My intention is to create the excel template then to automate for adding parameter from shared parameter text file.
Thanks you
Ah, ok. Look at the Orchid package. It will be very handy for you i think
I have tried… but it doesn’t have such node to get what i want … Anyway , thank for your advise.
Hi,
Use the Get Shared Parameter
node in the Genius Loci package to retrieve the names, types and groups.
@Alban_de_Chasteigner, Thanks for your adivse…
i was so happy because i though that i got what i want exactly but actually it doesn’t … ,
However , thank you so much for your advise.
I m trying to figuring out now… and if i got it , i will share with you all again.
thanks
Hi @Chicharito,
What from @Alban_de_Chasteigner’s comment is not what you are after? This should give you all the data you initially asked for which is the parameter name, type and group. Can you elaborate on what else you need so the forum can help as I think that there are already 2 solutions here with Alban’s being the simplest to implement.
Hi @Daniel_Woodcock1,
You may refer to my very first query together with the snap in this post.
Hope my query clear to you as well.
Appreciate for all your advise and support.
Ah, right… I see. So the parameters are not actually in revit but are in the shared parameter file and you want to find out what group they are in?
Exactly, But the shared parameter text file doesn’t have this group parameter name.
If the parameters are not in Revit, you can use the SharedParameterFile.Parse node in Clockwork package.
@Alban_de_Chasteigner Thanks for your precious support and really appreciated.
The graph result out only the shared parameter group name. but not the named of “Group parameter under”
However i figure out something that this is actually setting by default depend on which discipline and type of parameter we are using during creating the parameter. for example … if you choose length in the type of parameter then it will go to group parameter under - named “Dimension”. ,
Really so sorry if query is a bit silly …
Hi @Chicharito,
I added some outputs to my custom node including the Parameter Group.
P.S : @MartinSpence,
I think the OP is looking for the ParameterGroup and not the OwnerGroup property which was already proposed in post 6.
Hey Alban,
You are right, I should have cleaned up a bit, but this is working alright for me. I’ve tested on several different SP files.
import clr
#Import the Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
#Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
#Reference the active Document and application
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
#---###Start scripting here:###---#
#Open the active shared parameter file
spFile = app.OpenSharedParameterFile()
group = spFile.Groups #returns DefinitionGroup
definitions = []
for i in group:
definitions.append(i.Definitions) # this returns the ExternalDefinition for each parameter within the groups
ownergroup_name = []
for defin in definitions:
temp = []
for d in defin:
temp.append(d.OwnerGroup.Name) #from each ExternalDefinition we can get the owner group and from there the name (https://apidocs.co/apps/revit/2019/a4da80b2-5173-a24b-375a-c9932a1fa3d4.htm)
ownergroup_name.append(temp)
OUT = ownergroup_name