pyXam
August 11, 2024, 8:01pm
10
You can still use your orginal format, but between the grouptype & spectype string lists, you should be able to use python to get the actual required here maybe.
See these two topics.
Grouptype by String
Good Morning (NZ Time) @wesleyJHXGK
Hopefully this works for you. Given a list of strings, the code will check to see if the string matches any of the parameter grouptypes in the project and if there is, it will output it as a string for you to input into your list as required.
The handling of a not matching item is not strictly correct, but i’m assuming that your input list is perfect
I hope this answers your question, Have a great day!
[image]
Python Script #Made by pyXam
#https://…
Spectype By String
Hi,
here is a solution with Python
the input is a flat list of the Name of Parameter Type (Spec Type) :
in English
or
in Revit Current language
[image]
Python code (compatible to all engines)
import clr
import sys
import System
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentMana…
1 Like