Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning,
I am attempting to create a new Family Type, Shared Parameter in python/dynamo and ran into a little snag.
I was able to make a Family Type, Family Parameter successfully, but when I get into making a shared parameter I cannot find anything in the API for setting the Family Type Category so when it creates the family it sets the value to -1.
Any suggestions on where this topic may be covered I am missing, or what I am missing?
Thanks,
family_Category = family_Type.Category
type_Group = Compare_Built_In_Parameter_Groups(type_Parameter_Group)
#family_Paramater_Type = ParameterType.FamilyType
TransactionManager.Instance.EnsureInTransaction(doc)
if type_Parameter_Names_User_Input is not None:
type_Group = Compare_Built_In_Parameter_Groups(type_Parameter_Group)
type_Parameter_Names_List = type_Parameter_Names_User_Input.split(delim)
for type_Parameter_Name in type_Parameter_Names_List:
result.Add([type_Parameter_Name,type_Group,family_Category])
try:
add_Parameter = doc.FamilyManager.AddParameter(type_Parameter_Name, type_Group, family_Category, False)
except Exception as e:
result.Add("Run Failed"+ " " + e.ToString())
if parameter_Names_User_Input is not None and parameter_Type is not None and parameter_Group is not None:
parameter_Names_List = parameter_Names_User_Input.split(delim)
for parameter_Name in parameter_Names_List:
if parameter_Name != "":
shared_Parameter_Definition = ExternalDefinitionCreationOptions(parameter_Name, parameter_Type)
if hidden_Parameter == True:
shared_Parameter_Definition.Visible = False
shared_Parameter_Definition.UserModifiable = True
#if family_Type is None:
parameter_Group.Definitions.Create(shared_Parameter_Definition)
#else:
#shared_Parameter_Definition.
#family_Category = family_Type.Category
this portion of script creates this:
Solved! Go to Solution.
