tha
2007-10-22, 04:08 PM
Does anyone know how, or if it posible to create a new parameter using ElementSet instead of CategorySet? Because I would like to create some new parameters for our company families only, and not to the whole category.
Thanks in advance!
Ex.
Using the code from the "CreateShared" example, what need to be modify in this code so that it only create parameter in a certain number of families, and not to the whole categories.
'create a category set with the wall category in it
Dim categories As Autodesk.Revit.CategorySet
categories = commandData.Application.Create.NewCategorySet
Dim wallCategory As Autodesk.Revit.Category
wallCategory = commandData.Application.ActiveDocument.Settings.Categories.Item("Walls")
categories.Insert(wallCategory)
'create a new instance binding for the wall categories
Dim instanceBinding As Autodesk.Revit.Parameters.InstanceBinding
instanceBinding = commandData.Application.Create.NewInstanceBinding(categories)
'add the binding
commandData.Application.ActiveDocument.ParameterBindings.Insert(sharedParameterDefinition, instanceBinding)
Thanks in advance!
Ex.
Using the code from the "CreateShared" example, what need to be modify in this code so that it only create parameter in a certain number of families, and not to the whole categories.
'create a category set with the wall category in it
Dim categories As Autodesk.Revit.CategorySet
categories = commandData.Application.Create.NewCategorySet
Dim wallCategory As Autodesk.Revit.Category
wallCategory = commandData.Application.ActiveDocument.Settings.Categories.Item("Walls")
categories.Insert(wallCategory)
'create a new instance binding for the wall categories
Dim instanceBinding As Autodesk.Revit.Parameters.InstanceBinding
instanceBinding = commandData.Application.Create.NewInstanceBinding(categories)
'add the binding
commandData.Application.ActiveDocument.ParameterBindings.Insert(sharedParameterDefinition, instanceBinding)