private void GetParameters() { // get instance parameters List <Parameter> instanceParameters = new List <Parameter>(); foreach (Parameter parameter in NestedFamilyInstance.Parameters) { if (NestedFamilyInstance.Document.FamilyManager.CanElementParameterBeAssociated(parameter)) { instanceParameters.Add(parameter); } } instanceParameters.Sort((p1, p2) => string.Compare(p1.Definition.Name, p2.Definition.Name, StringComparison.Ordinal)); instanceParameters.ForEach(parameter => { InstanceParameters.Add(new NestedFamilyParameterModel(parameter, this, true, _mainViewModel)); }); // get type parameters List <Parameter> typeParameters = new List <Parameter>(); foreach (Parameter parameter in NestedFamilyInstance.Symbol.Parameters) { if (NestedFamilyInstance.Document.FamilyManager.CanElementParameterBeAssociated(parameter)) { typeParameters.Add(parameter); } } typeParameters.Sort((p1, p2) => string.Compare(p1.Definition.Name, p2.Definition.Name, StringComparison.Ordinal)); typeParameters.ForEach(parameter => { TypeParameters.Add(new NestedFamilyParameterModel(parameter, this, false, _mainViewModel)); }); }
public void PutInstanceParameter(InstanceParameter instanceParameter) { InstanceParameters.Add(instanceParameter); }