1 members found this post helpful.
Re: Modify instance parameter of many Adaptive Component Curtain Panels
Here's a macro that does what I think you are looking for. It finds every Generic Model instance whose family is "Diagnostic Tripod-3 point". It then gets the value of the "Panel ID" parameter, converts it to a string, gets a substring starting at the 2nd character, and converts this string back into an integer.
If you are interested in learning more about the API, you might enjoy my class at bit.ly/revitapi at my blog at http://boostyourbim.wordpress.com/
public void StripParamFirstDigit()
Document doc = this.ActiveUIDocument.Document;
using (Transaction t = new Transaction(doc,"Set Parameter Value"))
foreach (FamilyInstance fi in new FilteredElementCollector(doc)
.Where(q => q.Name == "Diagnostic Tripod-3 point"))
Parameter p = fi.get_Parameter("Panel ID");
int curVal = p.AsInteger();
int newVal = Convert.ToInt32(curVal.ToString().Substring(1));