
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I've been using Revit to create a few Family and tring to manage them in my addin. Notice that I create these family for a Rail Station, these're families like Rail, Turnout, Fastener, and so on. So these families do not have a system definition (is my expression right?).
It's been ok when I try to place them in a Revit project, but when I try to edit the parameter of a family instance of one of the above families, it kept showing an error message like "Create the Family Type Failed"... I'm really confused right now.
Here're my codes:
Transaction instanceEdit = new Transaction(doc, "Instance Edit"); instanceEdit.Start(); FamilyInstance fi = ***; foreach (Parameter p in fi.Parameters) { if (p.Definition.Name == "length") { p.Set(dataSet.dataLength); } if (p.Definition.Name == "width") { p.Set(dataSet.dataWidth); } if (p.Definition.Name == "height") { p.Set(dataSet.dataHeight); } } instanceEdit.Commit();
I'm sure of these parameters' existence, the "foreach" can find these parameters, but when the transaction commit, it shows an error says "Cannot generate Type: ***". (I'm using the Chinese version so I'm not sure how the original English error message says, is it saying Type or Symbol... but please tell me you understand what the error is)
Is my approach to edit the parameter wrong? Or?
Thanks!
Solved! Go to Solution.